ci.yml
1 name: CI 2 3 on: 4 pull_request: 5 branches: [main] 6 push: 7 branches: [main] 8 9 # Cancel in-progress runs on the same ref when new commits land, so rapid 10 # pushes to a PR don't stack parallel test runs. 11 concurrency: 12 group: ci-${{ github.ref }} 13 cancel-in-progress: true 14 15 jobs: 16 test: 17 # macos-latest matches the project's release.yml and the development 18 # target. ShanClaw ships a meaningful set of macOS-only tools 19 # (accessibility, ghostty, screenshot, applescript) whose tests 20 # invoke platform binaries directly; ubuntu runners lack those 21 # binaries and can't run the full suite. 22 runs-on: macos-latest 23 timeout-minutes: 10 24 steps: 25 - name: Checkout 26 uses: actions/checkout@v4 27 28 - name: Setup Go 29 uses: actions/setup-go@v5 30 with: 31 # Pin to the exact version in go.mod so CI tracks the project's 32 # Go version automatically on every bump. Mirrors release.yml. 33 go-version-file: go.mod 34 cache: true 35 36 - name: Verify modules 37 run: go mod verify 38 39 - name: Check go.mod/go.sum are tidy 40 # Fails loudly when a PR adds an import without running 41 # `go mod tidy`, instead of letting it pass silently and break 42 # downstream consumers of the module. 43 run: | 44 go mod tidy 45 git diff --exit-code go.mod go.sum 46 47 - name: Vet 48 run: go vet ./... 49 50 - name: Build 51 run: go build ./... 52 53 - name: Test 54 # -count=1 disables the test result cache so CI actually runs 55 # tests rather than replaying cached success from a prior run. 56 # -timeout is per-package; the job-level timeout-minutes above 57 # is the real overall ceiling. 58 # 59 # -skip '^TestGhosttyTool_ListTabs_Empty$' excludes one test 60 # that requires Ghostty >= 1.3.0 to be installed on the runner. 61 # GitHub's macos-latest images don't include Ghostty, and the 62 # test isn't a meaningful smoke signal for the marketplace / 63 # daemon work that actually needs CI coverage. Runs locally. 64 # Remove this skip if Ghostty is ever added to the runner setup. 65 run: go test -count=1 -timeout=5m -skip '^TestGhosttyTool_ListTabs_Empty$' ./...