Skip to content

Commit c11f901

Browse files
committed
ci: require detect-changes success in final checks aggregation
The checks job used if:always() plus shell-level result inspection of doc and the three test jobs, treating skipped as non-fatal to preserve intentional [doc-only] skips. detect-changes is a needs prerequisite of every test job but was absent from checks.needs, so a failure in the gating step silently cascaded into test-job skips and a green final status. Add detect-changes to checks.needs and require its result to be success. The legitimate doc-only skip path is unaffected because that leaves detect-changes itself successful.
1 parent f410ba6 commit c11f901

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ jobs:
379379
runs-on: ubuntu-latest
380380
needs:
381381
- should-skip
382+
- detect-changes
382383
- test-linux-64
383384
- test-linux-aarch64
384385
- test-windows
@@ -405,7 +406,16 @@ jobs:
405406
#
406407
# Note: When [doc-only] is in PR title, test jobs are intentionally
407408
# skipped and should not cause failure.
409+
#
410+
# detect-changes gates whether heavy test matrices run at all; if it
411+
# does not succeed, downstream test jobs are skipped rather than
412+
# failed, which would otherwise go unnoticed here. Require its
413+
# success explicitly so a broken gating step cannot masquerade as a
414+
# green CI run.
408415
doc_only=${{ needs.should-skip.outputs.doc-only }}
416+
if ${{ needs.detect-changes.result != 'success' }}; then
417+
exit 1
418+
fi
409419
if ${{ needs.doc.result == 'cancelled' || needs.doc.result == 'failure' }}; then
410420
exit 1
411421
fi

0 commit comments

Comments
 (0)