Interview Prep/Git & GitHub/Monorepos, large files and repository performance

How do you reduce CI checkout time?

IntermediateProductionMonorepos, large files and repository performance
Answer

Use fetch-depth: 1 when history is not needed, filter: blob:none plus sparse checkout for monorepos, cache the repo (or a mirror) on self-hosted runners and reuse workspace via a reference clone.

- uses: actions/checkout@v4
  with:
    fetch-depth: 1
    sparse-checkout: |
      services/billing
      libs
All Git & GitHub questions Roadmap: Git & GitHub

More on Monorepos, large files and repository performance