fix(ci): let main runs finish, and run Typecheck on every input that affects it
Issue for this PR
Closes #1465
Type of change
- Bug fix
- New feature
- Refactor / code improvement
- Documentation
What does this PR do?
Two changes to .github/workflows/ci.yml.
Main runs finish. cancel-in-progress is now ${{ github.event_name == 'pull_request' }}. A new push to a PR still cancels that PR's older run. On main, a run that has started is no longer cancelled by the next merge. GitHub still lets a newer main run replace one that is waiting to start, so the latest commit always gets a complete run, but each commit in a burst of merges may not.
Typecheck runs for every input that affects it. The typescript filter adds patches/**, script/check-tracker-leaks.ts and script/upstream/**, so PRs touching only those run both Typecheck and the TypeScript test job again. A new typecheck filter matching ci.yml runs only the Typecheck job when the workflow changes, so this PR gets Typecheck without the 60-minute test job.
Not included, from the same review: a typecheck script for packages/drivers (it does not pass today: its sources lack bun:sqlite types and its tests import opencode internals through @/ paths), and moving the setup steps shared by three jobs into a composite action.
How did you verify your code works?
- The workflow parses. All three new paths exist, and opencode's tests import the scripts (
test/skill/tracker-leak-check.test.ts,test/upstream/bridge-merge.test.ts,test/upstream/v140-merge-adversarial.test.ts). - This PR changes only
ci.yml, so its own checks exercise the new filter: Typecheck should run and TypeScript should be skipped. - The concurrency change is only observable on
main, after two merges land close together.
Checklist
- I have tested my changes locally
- I have not included unrelated changes in this PR
🤖 Generated with Claude Code
https://claude.ai/code/session_0174HUYiaceApqHP7EKMNgnb
Summary by cubic
Fixes CI on main so consecutive merges no longer cancel each other's runs, and ensures Typecheck runs for every change that can affect it. Closes #1465.
cancel-in-progressnow only applies to pull requests; onmaina started run finishes, while a queued run still yields to a newer commit.- The
typescriptfilter now includespatches/**,script/check-tracker-leaks.ts, andscript/upstream/**. - A new
typecheckfilter onci.ymlruns the Typecheck job but not the 60-minute test job when the workflow itself changes.
Summary by CodeRabbit
- Chores
- Pull request checks now cancel older in-progress runs, while checks on pushes to the main branch can finish.
- Workflow-only changes and relevant scripts are now included in TypeScript check selection.
- Type checking runs for workflow-only changes and pushes to the main branch without also triggering the TypeScript test job.