From 448eefe6fb9faec6820a2e12e00a03cbe22b539c Mon Sep 17 00:00:00 2001 From: fredcallagan Date: Fri, 6 Nov 2026 17:36:55 +0000 Subject: [PATCH 1/2] test: prove that a hand run counts for a PR (do not merge) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01UYququ3WS39mg9GreQ9iNb --- .github/workflows/arn-code-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/arn-code-ci.yml b/.github/workflows/arn-code-ci.yml index 7f49f2d..007b066 100644 --- a/.github/workflows/arn-code-ci.yml +++ b/.github/workflows/arn-code-ci.yml @@ -1,6 +1,6 @@ name: arn-code CI -# The quick check of every PR. The full test suite runs by hand: arn-code-full-tests.yml. +# The quick check of every PR (test of the required check; do not merge). The full test suite runs by hand: arn-code-full-tests.yml. on: pull_request: From d55a14fd4f6c099dbc9ec7c3351099a547230734 Mon Sep 17 00:00:00 2001 From: fredcallagan Date: Fri, 6 Nov 2026 17:40:07 +0000 Subject: [PATCH 2/2] ci: post the full-tests status from the hand run GitHub does not count the jobs of a hand run for a PR. A commit status counts for any PR on that commit. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01UYququ3WS39mg9GreQ9iNb --- .github/workflows/arn-code-full-tests.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/arn-code-full-tests.yml b/.github/workflows/arn-code-full-tests.yml index d5f7bbc..ec9e9db 100644 --- a/.github/workflows/arn-code-full-tests.yml +++ b/.github/workflows/arn-code-full-tests.yml @@ -1,8 +1,9 @@ name: arn-code full tests # Run by hand only: gh workflow run arn-code-full-tests.yml --ref -# Branch protection on main requires the "full-tests" check, so a PR cannot merge until this has -# passed on its last commit. A new push needs a new run. Keep this file free of pull_request and +# The ruleset on main requires the "full-tests" status, so a PR cannot merge until this has passed +# on its last commit. A new push needs a new run. The report job posts that status itself, because +# GitHub does not count the jobs of a hand run for a PR. Keep this file free of pull_request and # push triggers: a job skipped by a condition counts as passed for a required check. on: @@ -38,13 +39,22 @@ jobs: - name: Script and hook tests (system bash; 3.2 on macOS; Git Bash on Windows) run: bash tests/arn-code/run-tests.sh - # The one check that branch protection requires: its name does not change with the system list. - full-tests: + # Posts the one status that the ruleset requires: its name does not change with the system list. + report: needs: tests if: always() runs-on: ubuntu-latest + permissions: + statuses: write steps: - - name: All systems passed + - name: Post the full-tests status on the commit env: + GH_TOKEN: ${{ github.token }} RESULT: ${{ needs.tests.result }} - run: test "$RESULT" = success + run: | + state=failure + if [ "$RESULT" = success ]; then state=success; fi + gh api "repos/$GITHUB_REPOSITORY/statuses/$GITHUB_SHA" \ + -f state="$state" -f context=full-tests -f description="All systems: $RESULT" \ + -f target_url="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" + test "$state" = success