From 3b87e00f3a62be93f55a89df676b47a8fad22201 Mon Sep 17 00:00:00 2001 From: neuronull Date: Tue, 30 May 2023 15:02:15 -0600 Subject: [PATCH] fix(ci): add missing logic to mark required checks failed (#17543) - Test Suite and Integration Test Suite are required checks for CI, so their jobs always need to run (relevant if dependent job failed) to correctly mark the final status. --- .github/workflows/integration.yml | 2 ++ .github/workflows/test.yml | 13 +++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 959c43dde7058..898d4c6f4a649 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -121,9 +121,11 @@ jobs: - test_name: 'webhdfs' if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.webhdfs == 'true' }} + # This is a required status check, so it always needs to run if prior jobs failed, in order to mark the status correctly. integration: name: Integration Test Suite runs-on: ubuntu-latest + if: always() needs: - integration-matrix env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b36aba1f3108d..76ad3ce2e27db 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -139,14 +139,23 @@ jobs: path: "/tmp/vector-config-schema.json" if: success() || failure() + # This is a required status check, so it always needs to run if prior jobs failed, in order to mark the status correctly. all-checks: name: Test Suite runs-on: ubuntu-20.04 + if: always() needs: - checks - test-vrl - test-linux + env: + FAILED: ${{ contains(needs.*.result, 'failure') }} steps: - - name: validate - run: echo "OK" + - run: | + echo "failed=${{ env.FAILED }}" + if [[ "$FAILED" == "true" ]] ; then + exit 1 + else + exit 0 + fi