CI Playbooks
Lessons from software factories
- Implementations
- 254
- Merged PRs
- 226
- Playbooks
- 10
- Last updated
Agent-friendly playbooks for GitHub Actions
Each playbook is based on an analysis of each company's public posts, talks, commits and pull requests, as available.
- Read Anthropic’s playbookRun only affected tests
- Read DoorDash’s playbookRun build and test in parallel, sharded across CI agents
- Read Linear’s playbookBenchmark the same job on faster hardware
- Read Mastra’s playbookStarSling runners for the slowest test workflow
- Read OpenAI’s playbookRank CI fixes by the minutes they save
- Read Ramp’s playbookMove a CPU-bound test suite to a faster CPU
- Read Shopify’s playbookLet an agent iterate against one CI metric
- Read Spotify’s playbookBuild arm64 on native arm64 runners
- Read Stripe’s playbookRun only the tests a change can reach
- Read Uber’s playbookBuild the merge-queue speculations most likely to be needed
Find a CI improvement
What’s slowing your CI down?
141 techniques · 254 implementations. Find what fits your CI.
Filter by problemSelect any
141 techniques found 254 implementations
Cache package downloads and dependency stores
Restore package-manager downloads or dependency stores while keeping a locked install that validates the requested dependency graph.7 implementations · 6 companiesDoorDashLinearShopifySpotifyStripeUberRun independent checks in parallel
Remove false dependencies between lint, build, test, and formatting checks so independent work can start together.6 implementations · 6 companiesAnthropicDoorDashMastraOpenAIShopifyUberSkip jobs whose inputs have not changed
Gate expensive workflows and jobs on the files they consume, keeping required check behavior intact.7 implementations · 6 companiesAnthropicDoorDashMastraOpenAIShopifyStripeIsolate state before running tests in parallel
Give concurrent tests independent databases, services, or fixtures so they can share runner capacity without interfering with each other.5 implementations · 5 companiesDoorDashRampShopifyStripeUberRun only the tests a change can affect
Use dependency or observed-file relationships to select affected tests, with a full-suite fallback for changes the selector cannot classify.5 implementations · 4 companiesAnthropicMastraRampStripeCancel superseded pull request runs
Free runner capacity by canceling validation that a newer commit has replaced. Keep required main-branch and release runs intact.4 implementations · 4 companiesAnthropicMastraStripeUberMove bottlenecked jobs to faster runners
Benchmark the same workload on faster hardware and compare elapsed time and cost before changing runner capacity.4 implementations · 4 companiesLinearMastraOpenAIRampBalance test work across shards
Use measured runtimes or smaller test files to reduce the slowest shard, which determines when the suite finishes.4 implementations · 4 companiesLinearOpenAIRampStripeFetch only the repository history a job needs
Limit checkout depth and fetched refs to the comparisons or release history the job actually consumes.4 implementations · 4 companiesLinearMastraOpenAIStripeMatch test concurrency to the runner
Measure worker counts against available CPU and memory. More workers help only while the runner has capacity.4 implementations · 4 companiesAnthropicMastraOpenAIStripePut time limits on jobs that can hang
Set job timeouts from normal run history so stalled checks release runners and produce a failure that can be investigated.4 implementations · 4 companiesAnthropicMastraShopifySpotifyShowing 12 of 141 techniques
A skill for faster CI.
Install ci-speedup, an open-source agent skill that finds the CI optimizations that fit your repo.
Top techniques across playbooks
Techniques used by the most companies, with examples from their playbooks.
- Split long test suites across runnersUsed in 7 of 10 playbooks
- Cache package downloads and dependency storesUsed in 6 of 10 playbooks
- Run independent checks in parallelUsed in 6 of 10 playbooks
- Skip jobs whose inputs have not changedUsed in 6 of 10 playbooks
- Isolate state before running tests in parallelUsed in 5 of 10 playbooks
- Balance test work across shardsUsed in 4 of 10 playbooks
- Cancel superseded pull request runsUsed in 4 of 10 playbooks
- Fetch only the repository history a job needsUsed in 4 of 10 playbooks
- Match test concurrency to the runnerUsed in 4 of 10 playbooks
- Move bottlenecked jobs to faster runnersUsed in 4 of 10 playbooks
- Put time limits on jobs that can hangUsed in 4 of 10 playbooks
- Require verification before an agent hands over a pull requestUsed in 4 of 10 playbooks
From StarSling
Self-improving CI
CI optimization is continuous work. StarSling runners make GitHub Actions faster from the first job. On eligible paid plans, teams can turn on StarSling agents that keep finding improvements like these and open pull requests for your team to review.