Performance
Why is npm install slow in CI?
Quick answer
node_modules writes tens of thousands of small files, and network-attached CI disk handles that badly.
The detail that matters
Cache ~/.npm, use --prefer-offline, and run on a runner with local NVMe. Switching to pnpm helps more than any of them.
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
Why are GitHub Actions slow?Most commonly: shared vCPU, cold caches, network-attached disk, and queue time before the job even starts.How fast do runners start after a job is queued?runnerhut runners start in about three seconds from a warm pool.Do I need to change my workflow?No. Change the runs-on label and leave everything else as it is.How do I choose a runner size?Start one size above your current runner, then check CPU utilization and stop when the curve flattens.