Add a coverage gate to validate-workflows #92

Merged
Tirsvad merged 1 commits from coverage-gate into main 2026-10-11 06:07:53 +02:00
Owner

validate-workflows now fails when the line and branch coverage of tools/ is below 95%.

  • .coveragerc: source = tools, branch = True, fail_under = 95. Measured: 98% (97% before the last tests), so the gate leaves room for a few lines and fails when a tool grows without tests.
  • validate-workflows.yml: runs coverage run -m pytest -q tests, then a separate step coverage report, which is the gate and prints the missing lines.
  • tests/requirements.txt: coverage>=7,<8. README.md and its Danish and Malay Home pages show the two commands and the rule.
  • A test checks that the workflow, the limit and the requirement stay in place. Locally the gate was seen to fail (--fail-under=99 exits 2).
  • Fix of my own mistake in PR 91: .coverage (a binary data file) was committed there; it is removed from the repository and added to .gitignore.

Wiki pages changed: Home (en, da, ms; the test commands, the rule and the Validate workflows diagram label).

No issue closed: requested by the user.

validate-workflows now fails when the line and branch coverage of `tools/` is below 95%. - `.coveragerc`: `source = tools`, `branch = True`, `fail_under = 95`. Measured: 98% (97% before the last tests), so the gate leaves room for a few lines and fails when a tool grows without tests. - `validate-workflows.yml`: runs `coverage run -m pytest -q tests`, then a separate step `coverage report`, which is the gate and prints the missing lines. - `tests/requirements.txt`: `coverage>=7,<8`. `README.md` and its Danish and Malay Home pages show the two commands and the rule. - A test checks that the workflow, the limit and the requirement stay in place. Locally the gate was seen to fail (`--fail-under=99` exits 2). - Fix of my own mistake in PR 91: `.coverage` (a binary data file) was committed there; it is removed from the repository and added to `.gitignore`. Wiki pages changed: Home (en, da, ms; the test commands, the rule and the Validate workflows diagram label). No issue closed: requested by the user.
Tirsvad added 1 commit 2026-10-11 06:05:52 +02:00
Add a coverage gate to validate-workflows and stop tracking .coverage
Validate workflows / validate (pull_request) Successful in 22s
TirSystem/github-action: Publish wiki / publish-wiki (push) Skipped
TirSystem/github-action: Sync GitHub mirror metadata / sync-metadata (push) Skipped
075fae2e45
Task: MIL-003#3
Tirsvad merged commit 9cd723fb48 into main 2026-10-11 06:07:53 +02:00
Tirsvad deleted branch coverage-gate 2026-10-11 06:07:54 +02:00
Sign in to join this conversation.