chore(CI): cache coverage baseline from main for regression checks#4875
Merged
Conversation
abdnh
reviewed
May 21, 2026
abdnh
approved these changes
May 22, 2026
fernandolins
added a commit
that referenced
this pull request
May 25, 2026
## Linked issue Closes #4874 ## Summary / motivation Adds `tools/coverage/check-coverage-regression.py` to compare line coverage percentages from the current PR against the baseline saved from main (introduced in #4875). If any stack regresses beyond the configured tolerance (0.10%), the CI fails with a clear message showing the delta. Stacks checked: Rust, python-pylib, python-qt, TypeScript. ## How to test Try to add some new code without any tests. The Ci must fail. ## Before / after behavior Before: no signal when a PR reduces coverage below the current main level. After: CI fails on `Check coverage regression` with output like: ``` [rust] REGRESSION: 62.64% -> 61.00% (delta: -1.64%, tolerance: 0.10%) 1 stack(s) with coverage regression: rust ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue
Refs #4874
Summary / motivation
Stores the coverage results from every push to
mainin a GitHub Actionscache (
coverage-baseline-linux-{sha}). This is the foundation for afollow-up PR that will compare PR coverage against this baseline and fail
if any stack regresses.
No behavior change for PRs yet — the baseline is only saved, not used.
Before / after behavior
Before: no coverage data persisted between CI runs.
After: each push to
mainsavesout/coverage/as a cache entry, keyedby commit SHA, retrievable by prefix
coverage-baseline-linux-.