Interview Prep/GitHub Actions/Debugging, Cost, Monorepos & Releases

Name the top ways to reduce Actions minutes and wall-clock time.

IntermediateConceptDebugging, Cost, Monorepos & Releases
Answer
  1. concurrency with cancel-in-progress on PRs.
  2. Path filters and skip docs-only changes.
  3. Dependency and Docker layer caching.
  4. Short timeout-minutes to kill hangs.
  5. Smaller matrices on PRs, full matrix on main or nightly.
  6. Linux instead of Windows or macOS where possible; arm64 runners for arm builds instead of QEMU.
  7. Fewer, fatter jobs for tiny tasks (each job has fixed overhead); parallel jobs for long independent ones.
  8. Test sharding and running only affected tests in monorepos.
  9. Short artifact retention.

Measure first with the run timing API and the Actions usage metrics in org insights.

All GitHub Actions questions Roadmap: GitHub Actions

More on Debugging, Cost, Monorepos & Releases