Collect test matrix result into single job result (#3552)

This commit is contained in:
Laurenz 2024-03-05 12:55:00 +01:00 committed by GitHub
parent 668a79f9f9
commit aa69f44743
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,7 +6,22 @@ env:
RUSTDOCFLAGS: "-Dwarnings"
jobs:
# This allows us to have one branch protection rule for the full test matrix.
# See: https://github.com/orgs/community/discussions/4324
tests:
name: Tests
runs-on: ubuntu-latest
needs: [test-matrix]
if: always()
steps:
- name: Tests successful
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Tests failing
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
test-matrix:
name: Tests
strategy:
matrix: