Skip to content

Commit 2888286

Browse files
authored
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.
1 parent f854bb0 commit 2888286

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.github/workflows/integration.yml

+2
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,11 @@ jobs:
121121
- test_name: 'webhdfs'
122122
if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.webhdfs == 'true' }}
123123

124+
# This is a required status check, so it always needs to run if prior jobs failed, in order to mark the status correctly.
124125
integration:
125126
name: Integration Test Suite
126127
runs-on: ubuntu-latest
128+
if: always()
127129
needs:
128130
- integration-matrix
129131
env:

.github/workflows/test.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,23 @@ jobs:
139139
path: "/tmp/vector-config-schema.json"
140140
if: success() || failure()
141141

142+
# This is a required status check, so it always needs to run if prior jobs failed, in order to mark the status correctly.
142143
all-checks:
143144
name: Test Suite
144145
runs-on: ubuntu-20.04
146+
if: always()
145147
needs:
146148
- checks
147149
- test-vrl
148150
- test-linux
151+
env:
152+
FAILED: ${{ contains(needs.*.result, 'failure') }}
149153
steps:
150-
- name: validate
151-
run: echo "OK"
154+
- run: |
155+
echo "failed=${{ env.FAILED }}"
156+
if [[ "$FAILED" == "true" ]] ; then
157+
exit 1
158+
else
159+
exit 0
160+
fi
152161

0 commit comments

Comments
 (0)