Spring Boot
Spring Boot CI on GitHub Actions
Context loading dominates the test suite and dependencies resolve from scratch.
18 → 2
Context loads
13m → 4m
Test suite
Context loading dominates the test suite and dependencies resolve from scratch.
Why it happens
Each test class that changes the context configuration forces a fresh Spring context, and ~/.m2 is cold.
What to change
- Cache ~/.m2/repository or ~/.gradle/caches
- Share one Spring context across test classes by keeping configuration identical
- Use Testcontainers reuse so the database container is not recreated per class
- Run integration tests in a separate job from unit tests
Spring Boot on runnerhut
yaml
jobs: test: runs-on: runnerhut-8vcpu-ubuntu-2404 steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 with: { java-version: '21', distribution: temurin, cache: maven } - run: ./mvnw -B verifyThe only runnerhut-specific line is `runs-on: runnerhut-8vcpu-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.