From eef1cc401f7a4b60770af231e0dcb27a78b5a21d Mon Sep 17 00:00:00 2001 From: Rafi Shamim Date: Fri, 3 May 2024 13:36:29 -0400 Subject: [PATCH] workflows: add job to aggregate all test results This makes it possible to define a stably-named required status check. --- .github/workflows/ci.yaml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bff557b..764330e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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: