From aa69f4474344d44622fdd2a82e08a157e5656da4 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 5 Mar 2024 12:55:00 +0100 Subject: [PATCH] Collect test matrix result into single job result (#3552) --- .github/workflows/ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0ab420d3..730bf75f8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: