Skip to content

Commit 7478516

Browse files
ci: add aggregate CI Gate as the single required status check (#37)
Co-authored-by: agent-of-mkmeral <agent-of-mkmeral@users.noreply.github.com>
1 parent dcf4740 commit 7478516

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,26 @@ jobs:
146146

147147
- name: npm test
148148
run: npm test
149+
150+
# Single required status check. Branch protection can require just this one
151+
# context ("CI Gate") instead of every matrix leg (Rust/Python/Node/audit),
152+
# whose names change whenever the matrix changes. This job fails if any
153+
# needed job failed or was cancelled, so it is a faithful aggregate gate.
154+
gate:
155+
name: CI Gate
156+
if: always()
157+
needs: [rust, python, audit, node]
158+
runs-on: ubuntu-latest
159+
steps:
160+
- name: Verify all required jobs succeeded
161+
env:
162+
RESULTS: ${{ join(needs.*.result, ' ') }}
163+
run: |
164+
echo "Needed job results: $RESULTS"
165+
for result in $RESULTS; do
166+
if [ "$result" != "success" ]; then
167+
echo "::error::A required CI job did not succeed (result: $result)."
168+
exit 1
169+
fi
170+
done
171+
echo "All required CI jobs succeeded."

0 commit comments

Comments
 (0)