Guides
How to run only the tests affected by a change
Every push runs the whole test suite regardless of what changed.
6 min read
Every push runs the whole test suite regardless of what changed.
Why it happens
There is no mapping from changed files to affected tests, so CI has to assume everything is affected.
How to fix it
- Adopt a build system with affected-target analysis (Nx, Turborepo, Bazel, Pants)
- Fetch full git history so the base comparison is correct
- Keep a full-suite run on main so nothing hides behind a bad dependency graph
- Start with coarse path filters if a full task graph is too large a change
Your next build could be twice as fast, at half the price
Start free. Migrating away is the same one line, and we publish that diff too.
Related
How to speed up GitHub ActionsYour pipeline takes longer than anyone wants to wait, and it is not obvious where the time goes.How to find the slow step in a workflowThe pipeline is slow but every individual step looks reasonable.How to reduce GitHub Actions cold startsJobs sit for 30 to 90 seconds before the first step runs.How to diagnose GitHub Actions queue timesJobs are queued for minutes before a runner picks them up.