From 029d0f5a56401b8ac33932d865f9954e5691cb59 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..fcdf43ae 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,7 +8,22 @@ concurrency: cancel-in-progress: true jobs: - python38: + # Since the name of the matrix job depends on the version, we define another job with a more stable name. + 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