Clojure
Clojure CI on GitHub Actions
JVM startup and dependency resolution cost more than the tests.
80s → 3s
Dependency resolve
JVM startup and dependency resolution cost more than the tests.
Why it happens
~/.m2 and ~/.gitlibs are cold, and each clj invocation pays full JVM startup.
What to change
- Cache ~/.m2/repository and ~/.gitlibs keyed on deps.edn
- Run all test namespaces in one JVM rather than one per namespace
- Precompile with clj -T:build to avoid repeated AOT work
Clojure on runnerhut
yaml
jobs: test: runs-on: runnerhut-4vcpu-ubuntu-2404 steps: - uses: actions/checkout@v4 - uses: DeLaGuardo/setup-clojure@v13 with: { cli: latest } - run: clojure -M: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.