From 739cf23899c533f602d4798467ce70076f3a0d91 Mon Sep 17 00:00:00 2001 From: Rafi Shamim Date: Tue, 3 Oct 2023 12:39:40 -0400 Subject: [PATCH] workflows: add a wrapper job to report test results This wrapper job will have a stable name, so it's easy to configure a required check on it. --- .github/workflows/tests.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c01c6976..7a1f4f0b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,7 +8,22 @@ concurrency: cancel-in-progress: true jobs: - python38: + # This job aggregates all matrix results and is used for a GitHub required status check. + test_results: + if: ${{ always() }} + runs-on: ubuntu-22.04 + name: Test Results + needs: [test] + steps: + - run: | + result="${{ needs.test.result }}" + if [[ $result == "success" || $result == "skipped" ]]; then + exit 0 + else + exit 1 + fi + + test: runs-on: ubuntu-22.04 strategy: fail-fast: false