From a29b6c5ff487a2a3d1a1c3339fbe65957aa6eecf Mon Sep 17 00:00:00 2001 From: Travis Thompson Date: Mon, 13 Nov 2023 18:43:46 +0100 Subject: [PATCH] add job to check all build and test jobs successful --- .github/workflows/build_and_test.yml | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 2b2e7b7301..738da60228 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -577,3 +577,39 @@ jobs: run: | wget https://cqcl.github.io/tket/pytket/test-coverage/cov.xml -O oldcov.xml ./.github/workflows/compare-pytket-coverage oldcov.xml pytket-test-coverage/cov.xml + + check_all_build_and_test_jobs_successful: + name: All build and test jobs successful (or skipped) + needs: + - check_changes + - check_docs_tket + - check_format_tket + - build_test_tket + - build_test_tket_windows + - publish_pytket_coverage + - build_test_pytket_macos + - build_test_pytket_ubuntu + - build_test_pytket_windows + - publish_pytket_coverage + - check_pytket_coverage + if: always() + runs-on: ubuntu-22.04 + steps: + - shell: python + name: Check job results + run: | + results = [ + "${{ needs.check_changes.result }}", + "${{ needs.check_docs_tket.result }}", + "${{ needs.check_format_tket.result }}", + "${{ needs.build_test_tket.result }}", + "${{ needs.build_test_tket_windows.result }}", + "${{ needs.publish_pytket_coverage.result }}", + "${{ needs.build_test_pytket_macos.result }}", + "${{ needs.build_test_pytket_ubuntu.result }}", + "${{ needs.build_test_pytket_windows.result }}" + "${{ needs.publish_pytket_coverage.result }}", + "${{ needs.check_pytket_coverage.result }}", + ] + if "failure" in results or "cancelled" in results: + raise Exception