git-github-advanced: note the PR-head-checkout CI gotcha #24
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Thin launcher only — the logic lives in checks/ (see checks/README.md). | |
| name: Checks CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| test-and-conformance: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # Check out the PR's real head, not the synthetic refs/pull/N/merge commit | |
| # actions/checkout uses by default — otherwise HEAD is an ephemeral merge of | |
| # the branch into main, which the work-scoped squash-merge-history check would | |
| # (correctly, for that synthetic commit) flag. This makes CI evaluate exactly | |
| # what the local Stop hook does: the branch tip. Falls back to github.sha on push. | |
| ref: ${{ github.event.pull_request.head.sha || github.sha }} | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Unit tests | |
| run: node --test checks/test/*.test.mjs | |
| - name: Conformance sweep | |
| run: node checks/run.mjs |