|
| 1 | +# Runs the suite, `bash tests/run.sh`, on every pull request and on every push to main. |
| 2 | +# |
| 3 | +# A pull request is checked as GitHub would merge it into its base (refs/pull/<n>/merge), so the |
| 4 | +# result is for the merged tree and not only for the branch. A pull request that conflicts with |
| 5 | +# its base has no merge tree, and this check does not start for it. |
| 6 | +# |
| 7 | +# There is no path filter. A check that skips some changes stays "expected" forever on the pull |
| 8 | +# requests it skips, which blocks a merge if the author makes this check required. |
| 9 | +name: suite |
| 10 | + |
| 11 | +on: |
| 12 | + pull_request: |
| 13 | + push: |
| 14 | + branches: [main] |
| 15 | + |
| 16 | +# The suite reads the repository and writes nothing to it. It uses no secret. |
| 17 | +permissions: |
| 18 | + contents: read |
| 19 | + |
| 20 | +jobs: |
| 21 | + suite: |
| 22 | + name: bash tests/run.sh |
| 23 | + # A pinned image: Bash, python3, node, and git change when this line changes, not when GitHub |
| 24 | + # moves the "latest" label. README.md says what the suite needs: Bash 4+, python3, Node 20+. |
| 25 | + runs-on: ubuntu-24.04 |
| 26 | + timeout-minutes: 10 |
| 27 | + steps: |
| 28 | + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 29 | + with: |
| 30 | + persist-credentials: false |
| 31 | + |
| 32 | + # tests/run.sh runs the skills' commands under zsh, the shell Claude Code uses on macOS, and |
| 33 | + # skips that part when zsh is not installed. In CI a skipped part is not a pass, so install it. |
| 34 | + # The Ruff version is pinned: a new Ruff can add findings, and an unpinned one would turn a |
| 35 | + # pull request red for a change that did not cause it. To bump it, run |
| 36 | + # `ruff check scripts tests` with the new version first, then change the number here. |
| 37 | + # The suite fails when the CI variable is set and Ruff is missing (section 20). |
| 38 | + - name: Install zsh and Ruff |
| 39 | + run: | |
| 40 | + command -v zsh >/dev/null 2>&1 || { sudo apt-get update -q && sudo apt-get install -y -q zsh; } |
| 41 | + pipx install 'ruff==0.15.15' |
| 42 | +
|
| 43 | + - name: Show tool versions |
| 44 | + run: | |
| 45 | + bash --version | head -1 |
| 46 | + zsh --version |
| 47 | + python3 --version |
| 48 | + node --version |
| 49 | + git --version |
| 50 | + ruff --version |
| 51 | +
|
| 52 | + - name: Run the suite |
| 53 | + run: bash tests/run.sh |