Skip to content

Commit a26551e

Browse files
committed
github: add catch-all verify-core job
Add a verifcation job to simplify Github Actions workflow dependencies. This job depends on both packaging and testing jobs, so that any failure in either will prevent PR acceptance.
1 parent fa7f1ec commit a26551e

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/package_core.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
path: distrib/${{ env.CORE_ARTIFACT }}.tar.bz2
5656

5757
test-core:
58-
name: Test ${{ matrix.board }} board
58+
name: Test on ${{ matrix.board }}
5959
runs-on: ubuntu-latest
6060
needs: package-core
6161
strategy:
@@ -112,7 +112,7 @@ jobs:
112112
repo: context.repo.repo,
113113
run_id: context.runId
114114
});
115-
const job_name = `Test ${{ matrix.board }} board`
115+
const job_name = `Test on ${{ matrix.board }}`
116116
return workflow_run.jobs.find((job) => job.name === job_name).id;
117117
118118
- name: Prepare log
@@ -183,6 +183,17 @@ jobs:
183183
name: test-report-*
184184
failOnError: false
185185

186+
verify-core:
187+
name: Collect job errors
188+
runs-on: ubuntu-latest
189+
if: cancelled() || contains(needs.*.result, 'failure')
190+
needs:
191+
- package-core
192+
- test-core
193+
steps:
194+
- name: Notify failure
195+
run: exit 1
196+
186197
publish-core:
187198
name: Publish core
188199
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)