Skip to content

Cache sbt 2 build output in the coverage job - #21

Open
stasimus wants to merge 3 commits into
mainfrom
coverage-cache
Open

stasimus wants to merge 3 commits into
mainfrom
coverage-cache

Conversation

@stasimus

Copy link
Copy Markdown
Contributor

The coverage job rebuilt everything every run. cleanFull wiped sbt's action cache, and the cache alone isn't enough: it restores classes but not scoverage's scoverage-data, so a hit crashed the tests. ~/.cache/sbt and target/out now share one entry, stale measurements get dropped, cleanFull is off.

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 333360d0-f061-4ed5-97ab-61e2f8a003bb


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@stasimus

stasimus commented Sep 13, 2026

Copy link
Copy Markdown
Contributor Author

Why this is worth doing: test-coverage was the one job guaranteed to do a cold, full, instrumented build on every run. disk-cache: false meant nothing was restored, and cleanFull cleared sbt's action cache anyway, so even a restored cache would have been thrown away before the first compile.

sbt elapsed recompiled
cold, no cache 13 s 45 + 33 + 6 sources
rerun, nothing changed 2 s none
one source file changed 5 s 1 source

@mr-git mr-git left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read the description and comment, but I do not understand what this fixes

Comment thread .github/workflows/ci.yml Outdated
@stasimus

stasimus commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Not a bugfix. The intention is to include the coverage phase into the cache, so builds get faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants