mirror of
https://github.com/ankitects/anki.git
synced 2026-06-10 08:29:21 -04:00
## 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 ```