Performance
Why do my Python tests run slower in CI than locally?
Quick answer
pytest is serial by default, and your laptop has faster single-core performance and a warm filesystem cache.
The detail that matters
Run pytest -n auto with pytest-xdist. Most suites see a near-linear speedup up to the core count.
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.