Vitest
Vitest CI on GitHub Actions
Vitest re-optimises dependencies and runs in a single thread pool.
30s → 1s
Dep optimise
6m → 80s
Test suite
Vitest re-optimises dependencies and runs in a single thread pool.
Why it happens
node_modules/.vite is discarded and the default pool configuration is conservative.
What to change
- Cache node_modules/.vite keyed on the lockfile
- Use --pool=threads with maxThreads set to the core count
- Shard with --shard for large suites
Vitest on runnerhut
yaml
jobs: test: runs-on: runnerhut-8vcpu-ubuntu-2404 steps: - uses: actions/checkout@v4 - run: npm ci - run: npx vitest run --pool=threads --reporter=dotThe only runnerhut-specific line is `runs-on: runnerhut-8vcpu-ubuntu-2404`. Everything else is standard GitHub Actions — the same actions, the same secrets and the same permissions model you use today.
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.