From c4301ebd53e4bea8a32d4eca2fb22277bae6b4a6 Mon Sep 17 00:00:00 2001 From: fredcallagan Date: Fri, 6 Nov 2026 17:22:05 +0000 Subject: [PATCH] ci: run the full tests by hand, keep a quick check on every PR The quick check runs the static checks and the shell syntax check on Linux. The full tests on Linux, macOS and Windows move to a workflow that starts only by hand. Its full-tests check is the one to require in branch protection, so a PR cannot merge until the check passes on the last commit. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01UYququ3WS39mg9GreQ9iNb --- .github/workflows/arn-code-ci.yml | 23 ++--------- .github/workflows/arn-code-full-tests.yml | 50 +++++++++++++++++++++++ 2 files changed, 53 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/arn-code-full-tests.yml diff --git a/.github/workflows/arn-code-ci.yml b/.github/workflows/arn-code-ci.yml index 7f06341..7f49f2d 100644 --- a/.github/workflows/arn-code-ci.yml +++ b/.github/workflows/arn-code-ci.yml @@ -1,5 +1,7 @@ name: arn-code CI +# The quick check of every PR. The full test suite runs by hand: arn-code-full-tests.yml. + on: pull_request: paths: @@ -8,6 +10,7 @@ on: - "scripts/ci/**" - "tests/arn-code/**" - ".github/workflows/arn-code-ci.yml" + - ".github/workflows/arn-code-full-tests.yml" push: branches: [main] @@ -21,28 +24,8 @@ jobs: - uses: actions/checkout@v4 - name: Static checks (frontmatter, references, presets, hooks) run: python3 scripts/ci/validate-arn-code.py - - scripts: - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - runs-on: ${{ matrix.os }} - defaults: - run: - shell: bash - steps: - - uses: actions/checkout@v4 - name: Shell syntax run: | for f in plugins/arn-code/hooks/*.sh plugins/arn-code/skills/*/scripts/*.sh tests/arn-code/*.sh; do bash -n "$f" || exit 1 done - - name: Tool versions - run: | - bash --version | head -1 - command -v python3 && python3 --version || echo 'no working python3' - command -v python && python --version || echo 'no python' - command -v jq || echo 'no jq' - - name: Script and hook tests (system bash; 3.2 on macOS; Git Bash on Windows) - run: bash tests/arn-code/run-tests.sh diff --git a/.github/workflows/arn-code-full-tests.yml b/.github/workflows/arn-code-full-tests.yml new file mode 100644 index 0000000..d5f7bbc --- /dev/null +++ b/.github/workflows/arn-code-full-tests.yml @@ -0,0 +1,50 @@ +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 +# push triggers: a job skipped by a condition counts as passed for a required check. + +on: + workflow_dispatch: + +permissions: + contents: read + +# A new run on the same branch replaces the one in progress. +concurrency: + group: full-tests-${{ github.ref }} + cancel-in-progress: true + +jobs: + tests: + timeout-minutes: 150 + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v4 + - name: Tool versions + run: | + bash --version | head -1 + command -v python3 && python3 --version || echo 'no working python3' + command -v python && python --version || echo 'no python' + command -v jq || echo 'no jq' + - 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: + needs: tests + if: always() + runs-on: ubuntu-latest + steps: + - name: All systems passed + env: + RESULT: ${{ needs.tests.result }} + run: test "$RESULT" = success