Elixir
Elixir CI on GitHub Actions
mix deps.get and compilation both start from nothing each run.
4m → 30s
Compile
9m → 3m
Full pipeline
mix deps.get and compilation both start from nothing each run.
Why it happens
deps/ and _build/ are not cached, so every dependency recompiles even though none changed.
What to change
- Cache deps/ and _build/ keyed on mix.lock and the OTP/Elixir versions
- Compile with MIX_ENV=test once and reuse for both credo and tests
- Run --warnings-as-errors in a separate fast job so it fails early
- Use ExUnit's built-in async tests — most suites leave them off by accident
Elixir on runnerhut
yaml
jobs: test: runs-on: runnerhut-4vcpu-ubuntu-2404 steps: - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: { otp-version: '27', elixir-version: '1.18' } - run: mix deps.get - run: mix testThe 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.