Interview Prep/Git & GitHub/GitHub Actions, environments and releases in production

How do you speed up slow GitHub Actions pipelines?

IntermediateProductionGitHub Actions, environments and releases in production
Answer

Cache dependencies and Docker layers (actions/cache, setup-* caching, buildx cache-to type=gha), run independent jobs in parallel, shard tests with a matrix, use path filters, cancel superseded runs with concurrency, and move to larger or faster runners for the long pole. Measure with job timing before tuning.

concurrency:
  group: ci-${{ github.ref }}
  cancel-in-progress: true
All Git & GitHub questions Roadmap: Git & GitHub

More on GitHub Actions, environments and releases in production