Skip to content

Angular

Angular CI on GitHub Actions

ng build and ng test both start from a cold cache each run.

6m → 2m
Build

ng build and ng test both start from a cold cache each run.

Why it happens

Angular's build cache in .angular/cache is not persisted, so the whole graph recompiles.

What to change

  1. Cache .angular/cache keyed on the lockfile
  2. Run tests headless with --no-watch --browsers=ChromeHeadless
  3. Use Nx or the Angular build cache if you have more than a couple of libraries

Angular on runnerhut

yaml
jobs:
test:
runs-on: runnerhut-4vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npx ng test --no-watch --browsers=ChromeHeadless
- run: npx ng build --configuration production
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.