SonarQube
SonarQube CI on GitHub Actions
Analysis re-scans the whole codebase on every pull request.
11m → 3m
Scan
Analysis re-scans the whole codebase on every pull request.
Why it happens
The SonarQube analysis cache is not persisted and shallow clones break blame attribution.
What to change
- Cache ~/.sonar/cache keyed on the scanner version
- Fetch full git history so blame data is accurate
- Run analysis only on the changed files for pull-request scans
SonarQube on runnerhut
yaml
jobs: scan: runs-on: runnerhut-8vcpu-ubuntu-2404 steps: - uses: actions/checkout@v4 with: { fetch-depth: 0 } - uses: SonarSource/sonarqube-scan-action@v4The 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.