From a30c1c6ed79a9200b0ad7cbd84c5222fcd505fcb Mon Sep 17 00:00:00 2001 From: Renn F Date: Tue, 3 Nov 2026 00:33:25 +0100 Subject: [PATCH] ci: add the ci gate job that master-rule requires master-rule has required a status context named ci, but no job here was called ci, so the check never reported and every merge leaned on the admin bypass. The new job needs every other job in ci.yml, always runs, and fails if any of them failed or was cancelled. A skipped job counts as passed. The PHP lint step now reads find's output with a null-delimited while loop, so actionlint's shellcheck pass (SC2044) is clean on this file too. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01E28c6iftj4hRmx55Uaaoxc --- .github/workflows/ci.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 24d9953..e5c7526 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,7 @@ jobs: run: composer install --no-interaction --no-progress - name: php -l sweep - run: for f in $(find src bin -name '*.php'); do php -l "$f" > /dev/null || exit 1; done && echo LINT_OK + run: find src bin -name '*.php' -print0 | while IFS= read -r -d '' f; do php -l "$f" > /dev/null || exit 1; done && echo LINT_OK - name: test_agent env: @@ -125,3 +125,20 @@ jobs: env: REDIS_HOST: 127.0.0.1 run: php .github/coverage-runner.php bin/test_agent.php + + ci: + # The context master-rule requires: it reports on every run and fails when a job above failed or was + # cancelled. A skipped job counts as passed. + if: always() + needs: [test, composer-audit, coverage] + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Every job above succeeded or was skipped + env: + RESULTS: ${{ join(needs.*.result, ' ') }} + run: | + echo "needs: $RESULTS" + for result in $RESULTS; do + case "$result" in failure|cancelled) exit 1 ;; esac + done