This is an automated email from the ASF dual-hosted git repository.

sjanc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git

commit 6c259c7ac3b3657b768a74104a81fa5564dab41f
Author: Szymon Janc <[email protected]>
AuthorDate: Fri Oct 16 22:06:45 2026 +0200

    ci: Merge test workflows into single workflow
    
    Run unit tests, the sysinit test and the commands test as jobs of one
    CI workflow, with 6 jobs in total, well within the ASF limit of 20
    concurrent jobs per workflow.
    
    The sysinit test runs as part of the integration job, before the
    commands test. The commands test is split into steps, so failures and
    time spent are easier to find.
    
    Run on push to master only, as pull requests from repository branches
    were tested twice. Cancel runs superseded by a newer push, limit the
    token to reading contents and add job timeouts.
    
    Assisted-by: Claude:claude-opus-5-5
---
 .github/workflows/ci.yml            | 154 ++++++++++++++++++++++++++++++++++++
 .github/workflows/test_commands.yml |  97 -----------------------
 .github/workflows/test_sysinit.yml  |  53 -------------
 .github/workflows/test_unit.yml     |  41 ----------
 README.md                           |   8 +-
 5 files changed, 156 insertions(+), 197 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000..b7256e82
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,154 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+name: CI
+
+on:
+  push:
+    branches: [master]
+  pull_request:
+  workflow_dispatch:
+
+permissions:
+  contents: read
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || 
github.ref }}
+  cancel-in-progress: true
+
+defaults:
+  run:
+    shell: bash
+
+jobs:
+  unit:
+    name: Unit tests (${{ matrix.os }})
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [ubuntu-latest, windows-latest, macos-latest]
+    runs-on: ${{ matrix.os }}
+    timeout-minutes: 20
+    steps:
+      - uses: actions/checkout@v7
+      - uses: actions/setup-go@v7
+        with:
+          go-version: 'stable'
+      - name: Run tests
+        run: |
+          go version
+          go test -v ./newt
+
+  integration:
+    name: Integration tests (${{ matrix.os }})
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [ubuntu-latest, windows-latest, macos-latest]
+    runs-on: ${{ matrix.os }}
+    timeout-minutes: 45
+    steps:
+      - uses: actions/checkout@v7
+      - uses: actions/setup-go@v7
+        with:
+          go-version: 'stable'
+      - uses: carlosperate/[email protected]
+        with:
+          release: '12.2.Rel1'
+      - name: Install dependencies
+        if: matrix.os == 'ubuntu-latest'
+        run: |
+          sudo apt-get update
+          sudo apt-get install -y gcc-multilib
+      - name: Build newt
+        working-directory: newt
+        run: |
+          go version
+          go build
+          echo ${GITHUB_WORKSPACE}/newt >> $GITHUB_PATH
+
+      - name: Sysinit configuration
+        run: |
+          cp -r .github/newt_sysinit sysinit
+          cp -r .github/targets sysinit/targets
+          cd sysinit
+          newt upgrade -v --shallow=1
+          newt info
+          newt target sysinit brief nordic_pca10056_btshell > tmp.txt
+          diff -w tmp.txt expected.txt
+
+      - name: Create project
+        run: |
+          newt
+          newt help
+          newt version
+          newt new project
+          cp .github/newt_commands/project.yml project/
+          cp -r .github/targets/nordic_pca10056_btshell project/targets
+      - name: Upgrade project
+        working-directory: project
+        run: |
+          newt upgrade -v --escape=false apache-mynewt-core 
apache-mynewt-nimble
+          newt info
+      - name: Build target
+        working-directory: project
+        run: |
+          newt build nordic_pca10056_btshell
+          newt create-image nordic_pca10056_btshell 1.0.0
+          newt size nordic_pca10056_btshell
+          newt size -F -R nordic_pca10056_btshell
+      - name: Package commands
+        working-directory: project
+        run: |
+          newt vals api app bsp build_profile compiler lib sdk target
+          newt pkg new --type=pkg sys/mylib
+          newt pkg copy apps/blinky apps/myapp
+          newt pkg move apps/myapp apps/newapp
+          newt pkg remove apps/newapp
+      - name: Target commands
+        working-directory: project
+        run: |
+          newt target show
+          newt target create my_target1
+          newt target set my_target1 
bsp=@apache-mynewt-core/hw/bsp/nordic_pca10056
+          newt target set my_target1 app=apps/blinky
+          newt target set my_target1 build_profile=optimized cflags="-DNDEBUG"
+          newt target set my_target1 syscfg=LOG_NEWTMGR=1:CONFIG_NEWTMGR=0
+          newt target config init -f my_target1
+          newt target copy my_target1 my_target2
+          newt target amend my_target1 lflags="-Lmylib" 
syscfg=LOG_LEVEL=0:CONFIG_NEWTMGR=0
+          newt target delete -f my_target1
+          newt target delete -f my_target2
+          newt target cmake nordic_pca10056_btshell
+          newt target dep nordic_pca10056_btshell
+          newt target revdep nordic_pca10056_btshell
+      - name: Upgrade installed project
+        working-directory: project
+        run: |
+          newt upgrade -v
+          rm -rf repos/apache-mynewt-nimble
+          newt upgrade -v
+          test -d repos/apache-mynewt-nimble/nimble
+      - name: Unit test and simulator build
+        if: matrix.os == 'ubuntu-latest'
+        working-directory: project
+        run: |
+          newt test @apache-mynewt-core/util/cbmem
+          newt build my_blinky_sim
+          newt clean my_blinky_sim
diff --git a/.github/workflows/test_commands.yml 
b/.github/workflows/test_commands.yml
deleted file mode 100644
index 46440e17..00000000
--- a/.github/workflows/test_commands.yml
+++ /dev/null
@@ -1,97 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-name: Test commands
-
-on: [push, pull_request]
-
-jobs:
-  test_commands:
-    name: other
-    strategy:
-      fail-fast: false
-      matrix:
-        os: [ubuntu-latest, windows-latest, macos-latest]
-    runs-on: ${{ matrix.os }}
-    steps:
-      - uses: actions/checkout@v7
-      - uses: actions/setup-go@v7
-        with:
-          go-version: 'stable'
-      - uses: carlosperate/[email protected]
-        with:
-          release: '12.2.Rel1'
-      - name: Install Dependencies
-        if: matrix.os == 'ubuntu-latest'
-        run: |
-             sudo apt-get update
-             sudo apt-get install -y gcc-multilib
-      - name: Build newt
-        working-directory: newt
-        shell: bash
-        run: |
-             go version
-             go build
-             echo  ${GITHUB_WORKSPACE}/newt >> $GITHUB_PATH
-      - name: Test commands
-        shell: bash
-        run: |
-             newt
-             newt help
-             newt version
-             newt new project
-             cp .github/newt_commands/project.yml project/
-             cp -r .github/targets/nordic_pca10056_btshell project/targets
-             cd project/
-             newt upgrade -v --escape=false apache-mynewt-core 
apache-mynewt-nimble
-             newt info
-             newt build nordic_pca10056_btshell
-             newt create-image nordic_pca10056_btshell 1.0.0
-             newt size nordic_pca10056_btshell
-             newt size -F -R nordic_pca10056_btshell
-             newt vals api app bsp build_profile compiler lib sdk target
-             newt pkg new --type=pkg sys/mylib
-             newt pkg copy apps/blinky apps/myapp
-             newt pkg move apps/myapp apps/newapp
-             newt pkg remove apps/newapp
-             newt target show
-             newt target create my_target1
-             newt target set my_target1 
bsp=@apache-mynewt-core/hw/bsp/nordic_pca10056
-             newt target set my_target1 app=apps/blinky
-             newt target set my_target1 build_profile=optimized 
cflags="-DNDEBUG"
-             newt target set my_target1 syscfg=LOG_NEWTMGR=1:CONFIG_NEWTMGR=0
-             newt target config init -f my_target1
-             newt target copy my_target1 my_target2
-             newt target amend my_target1 lflags="-Lmylib" 
syscfg=LOG_LEVEL=0:CONFIG_NEWTMGR=0
-             newt target delete -f my_target1
-             newt target delete -f my_target2
-             newt target cmake nordic_pca10056_btshell
-             newt target dep nordic_pca10056_btshell
-             newt target revdep nordic_pca10056_btshell
-             newt upgrade -v
-             rm -rf repos/apache-mynewt-nimble
-             newt upgrade -v
-             test -d repos/apache-mynewt-nimble/nimble
-      - name: Test commands 2
-        if: matrix.os == 'ubuntu-latest'
-        run: |
-             cd project
-             newt test @apache-mynewt-core/util/cbmem
-             newt build my_blinky_sim
-             newt clean my_blinky_sim
diff --git a/.github/workflows/test_sysinit.yml 
b/.github/workflows/test_sysinit.yml
deleted file mode 100644
index eb0d495c..00000000
--- a/.github/workflows/test_sysinit.yml
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-name: Test sysinit
-
-on: [push, pull_request]
-
-jobs:
-  test_sysinit:
-    name: other
-    strategy:
-      fail-fast: false
-      matrix:
-        os: [ubuntu-latest, windows-latest, macos-latest]
-    runs-on: ${{ matrix.os }}
-    steps:
-      - uses: actions/checkout@v7
-      - uses: actions/setup-go@v7
-        with:
-          go-version: 'stable'
-      - name: Build newt
-        working-directory: newt
-        shell: bash
-        run: |
-             go version
-             go build
-             echo  ${GITHUB_WORKSPACE}/newt >> $GITHUB_PATH
-      - name: Test_sysinit
-        shell: bash
-        run: |
-             cp -r .github/newt_sysinit project
-             cp -r .github/targets project/targets
-             cd project/
-             newt upgrade -v --shallow=1
-             newt info
-             newt target sysinit brief nordic_pca10056_btshell > tmp.txt
-             diff -w tmp.txt expected.txt
diff --git a/.github/workflows/test_unit.yml b/.github/workflows/test_unit.yml
deleted file mode 100644
index 2a93d10d..00000000
--- a/.github/workflows/test_unit.yml
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-name: Unit tests
-
-on: [push, pull_request]
-
-jobs:
-  unit_tests:
-    name: go test
-    strategy:
-      fail-fast: false
-      matrix:
-        os: [ubuntu-latest, windows-latest, macos-latest]
-    runs-on: ${{ matrix.os }}
-    steps:
-      - uses: actions/checkout@v7
-      - uses: actions/setup-go@v7
-        with:
-          go-version: 'stable'
-      - name: Run tests
-        shell: bash
-        run: |
-             go version
-             go test -v ./newt
diff --git a/README.md b/README.md
index 594bde04..918d3fc3 100644
--- a/README.md
+++ b/README.md
@@ -19,12 +19,8 @@
 #
 -->
 
-<a 
href="https://github.com/apache/mynewt-newt/actions/workflows/test_commands.yml";>
-  <img 
src="https://github.com/apache/mynewt-newt/actions/workflows/test_commands.yml/badge.svg";>
-<a/>
-
-<a 
href="https://github.com/apache/mynewt-newt/actions/workflows/test_unit.yml";>
-  <img 
src="https://github.com/apache/mynewt-newt/actions/workflows/test_unit.yml/badge.svg";>
+<a href="https://github.com/apache/mynewt-newt/actions/workflows/ci.yml";>
+  <img 
src="https://github.com/apache/mynewt-newt/actions/workflows/ci.yml/badge.svg";>
 <a/>
 
 # Newt

Reply via email to