Files
anki/tools
Fernando Lins 3f6378aee7 ci(coverage): fail PR if line coverage regresses (#4876)
## 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
```
2026-05-25 13:46:57 -03:00
..
2026-05-05 17:29:18 -04:00
2026-05-05 17:29:18 -04:00
2025-06-19 14:03:16 +07:00
2023-07-03 17:24:27 +10:00
2025-02-19 10:34:45 +07:00
2025-06-20 16:52:25 +07:00
2023-09-14 09:23:44 +10:00
2025-06-29 22:30:20 +07:00
2023-06-20 20:40:43 +10:00
2025-06-29 14:38:35 +07:00
2025-07-08 01:14:40 +07:00
2026-05-05 17:29:18 -04:00
2026-05-05 17:29:18 -04:00
2025-10-27 19:31:59 +07:00
2022-11-27 15:24:20 +10:00
2023-06-26 15:50:34 +10:00