Skip to content

Svelte

Svelte CI on GitHub Actions

SvelteKit builds and Playwright tests run cold on every push.

60s → 3s
Browser install
3m → 45s
Build

SvelteKit builds and Playwright tests run cold on every push.

Why it happens

Neither the Vite dependency cache nor the Playwright browser cache survives between jobs.

What to change

  1. Cache node_modules/.vite and ~/.cache/ms-playwright
  2. Run svelte-check in a parallel job rather than blocking the build
  3. Use the adapter's build output cache where your adapter supports it

Svelte on runnerhut

yaml
jobs:
test:
runs-on: runnerhut-4vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npx playwright install --with-deps chromium
- run: npm run build && npm run test
A working starting point

The 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.