Skip to content

Commit

Permalink
workflows: add job to aggregate all test results
Browse files Browse the repository at this point in the history
This makes it possible to define a stably-named required status check.
  • Loading branch information
rafiss committed May 3, 2024
1 parent 75d820d commit eef1cc4
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/ci.yaml
Expand Up @@ -7,7 +7,22 @@ on:
branches: [ master ]

jobs:
build-and-test:
# This job aggregates all matrix results and is used for a GitHub required status check.
test_results:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Test Results
needs: [build_and_test]
steps:
- run: |
result="${{ needs.build_and_test.result }}"
if [[ $result == "success" || $result == "skipped" ]]; then
exit 0
else
exit 1
fi
build_and_test:
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down

0 comments on commit eef1cc4

Please sign in to comment.