Vue
Vue CI on GitHub Actions
Vite rebuilds the dependency pre-bundle on every CI run.
35s → 2s
Pre-bundle
4m → 60s
Test run
Vite rebuilds the dependency pre-bundle on every CI run.
Why it happens
node_modules/.vite holds the optimised dependency bundle and is thrown away.
What to change
- Cache node_modules/.vite keyed on the lockfile
- Run vitest with --pool=threads to use every core
- Build and test in the same job so the pre-bundle is reused
Vue on runnerhut
yaml
jobs: test: runs-on: runnerhut-4vcpu-ubuntu-2404 steps: - uses: actions/checkout@v4 - run: npm ci - run: npx vitest run --pool=threads - run: npm run buildThe only runnerhut-specific line is `runs-on: runnerhut-4vcpu-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.