mirror of
https://github.com/ankitects/anki.git
synced 2026-08-31 05:46:43 +00:00
Anki is a smart spaced repetition flashcard program
https://apps.ankiweb.net
## Linked issue Fixes #5418 ## Summary / motivation Every push to `main` creates a new `coverage-baseline-linux-<sha>` cache entry. Without a pruning step, these entries accumulate until GitHub's LRU eviction removes old ones. When the baseline a PR needs has been evicted, `check-coverage-regression.py` silently skips the check instead of failing, which could mask genuine coverage regressions. Two changes together close the gap: 1. **`prune-coverage-cache.yml`**: a new workflow triggered by `workflow_run` on every successful CI run on `main`. It keeps exactly one `coverage-baseline-linux-*` cache (the one just created) and deletes all older entries via the GitHub Actions API. With a single, always-fresh entry, eviction becomes practically impossible. 2. **`check-coverage-regression.py`**: turns the silent "no baseline — skipping" path into an explicit failure (`exit 2`). If somehow a baseline is still absent, the check now surfaces the problem visibly instead of passing silently. ## Steps to reproduce 1. Allow several pushes to `main` to accumulate `coverage-baseline-linux-*` cache entries until GitHub evicts the most recent one. 2. Open a PR: `check-coverage-regression.py` prints `no baseline — skipping` and exits 0, even if coverage dropped. ## How to test ### Details - After merging, verify via **Actions → Prune coverage baseline caches** that the job runs after a `CI` completion on `main` and leaves exactly one `coverage-baseline-linux-*` entry (`gh cache list -R ankitects/anki --key coverage-baseline-linux-`). - Confirm that a PR with a missing baseline now receives exit code 2 (visible failure) instead of exit code 0. ## Before / after behavior **Before:** evicted baseline → `check-coverage-regression.py` skips silently, coverage regressions go undetected. **After:** only one baseline exists at a time (no eviction risk); if it is somehow absent, the script exits with code 2 and the CI step fails visibly. |
||
|---|---|---|
| .cargo | ||
| .config | ||
| .cursor/rules | ||
| .github | ||
| .idea.dist | ||
| .vscode.dist | ||
| build | ||
| cargo | ||
| docs | ||
| docs-site | ||
| ftl | ||
| proto | ||
| pylib | ||
| python | ||
| qt | ||
| rslib | ||
| tools | ||
| ts | ||
| .complexipy.toml | ||
| .deny.toml | ||
| .dockerignore | ||
| .dprint.json | ||
| .eslintrc.cjs | ||
| .gitattributes | ||
| .gitignore | ||
| .gitmodules | ||
| .mypy.ini | ||
| .pre-commit-config.yaml | ||
| .prettierrc | ||
| .python-version | ||
| .readthedocs.yaml | ||
| .ruff.toml | ||
| .rustfmt-empty.toml | ||
| .rustfmt.toml | ||
| .version | ||
| .yarnrc.yml | ||
| AGENTS.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| check | ||
| CLAUDE.md | ||
| CONTRIBUTORS | ||
| justfile | ||
| LICENSE | ||
| ninja | ||
| package.json | ||
| playwright.config.ts | ||
| pyproject.toml | ||
| README.md | ||
| release.just | ||
| run | ||
| run.bat | ||
| rust-toolchain.toml | ||
| SECURITY.md | ||
| sonar-project.properties | ||
| tsconfig.json | ||
| uv.lock | ||
| yarn | ||
| yarn.bat | ||
| yarn.lock | ||
Anki
This repo contains the source code for the computer version of Anki.
About
Anki is a spaced repetition program. Please see the website to learn more.
Getting Started
Contributing
Want to contribute to Anki? Check out the Contribution Guidelines.
For more information on building and developing, please see Development.
Contributors
The following people have contributed to Anki: CONTRIBUTORS
Anki Betas
If you'd like to try development builds of Anki but don't feel comfortable building the code, please see Anki betas.
License
Anki's license: LICENSE