Skip to content

Commit

Permalink
fix(ci): add missing logic to mark required checks failed (#17543)
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
neuronull authored May 30, 2023
1 parent b0ed167 commit 3b87e00
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3b87e00

Please sign in to comment.