Merge pull request #207 from deepseek-harness/all-checks-passed-gate
ci: add all-checks-passed aggregate job for branch protection
This commit is contained in:
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
@@ -128,3 +128,25 @@ jobs:
|
|||||||
|
|
||||||
- name: Run compatibility gates
|
- name: Run compatibility gates
|
||||||
run: pnpm run check:node-compat
|
run: pnpm run check:node-compat
|
||||||
|
|
||||||
|
# Single stable required check for branch protection: require "all checks
|
||||||
|
# passed" instead of enumerating matrix legs whose names change as lanes and
|
||||||
|
# node versions evolve. Every other job in THIS workflow must be listed in
|
||||||
|
# `needs` (`needs` cannot reach across workflow files; e2e.yml stays its own
|
||||||
|
# check). `if: always()` is load-bearing: without it a failed dependency
|
||||||
|
# would SKIP this job, and GitHub counts a skipped required check as passing
|
||||||
|
# — so this job always runs and fails on any non-success result, including
|
||||||
|
# 'cancelled' and 'skipped'.
|
||||||
|
all-checks-passed:
|
||||||
|
name: all checks passed
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [node-24, node-compat]
|
||||||
|
if: always()
|
||||||
|
steps:
|
||||||
|
- name: Fail if any needed job did not succeed
|
||||||
|
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')
|
||||||
|
run: |
|
||||||
|
echo "::error::Needed job results: ${{ join(needs.*.result, ', ') }}"
|
||||||
|
exit 1
|
||||||
|
- name: All checks passed
|
||||||
|
run: echo "All needed jobs succeeded (${{ join(needs.*.result, ', ') }})"
|
||||||
|
|||||||
Reference in New Issue
Block a user