Skip to content

Commit eef1cc4

Browse files
committed
workflows: add job to aggregate all test results
This makes it possible to define a stably-named required status check.
1 parent 75d820d commit eef1cc4

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,22 @@ on:
77
branches: [ master ]
88

99
jobs:
10-
build-and-test:
10+
# This job aggregates all matrix results and is used for a GitHub required status check.
11+
test_results:
12+
if: ${{ always() }}
13+
runs-on: ubuntu-latest
14+
name: Test Results
15+
needs: [build_and_test]
16+
steps:
17+
- run: |
18+
result="${{ needs.build_and_test.result }}"
19+
if [[ $result == "success" || $result == "skipped" ]]; then
20+
exit 0
21+
else
22+
exit 1
23+
fi
24+
25+
build_and_test:
1126
runs-on: ubuntu-latest
1227
strategy:
1328
matrix:

0 commit comments

Comments
 (0)