chore(coverage): declare the gate in [tool.coverage.report] and measure only in test-ci - #17
Merged
Conversation
…re only in test-ci
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.
Summary
Converges the coverage gate on the modern-python standard, section 5: the 100 % gate is declared once as
[tool.coverage.report] fail_under = 100, and coverage is measured only byjust test-ci(andtest-branch), never on every run through pytestaddopts.pytest-cov reads
fail_underfrom the coverage config when no--cov-fail-underflag is given and applies it whenever coverage is measured, so the gate fires intest-ciexactly as before and a targetedjust testrun stays gate-free. coverage special-cases 100: the total must really be 100, no rounding.Changes
pyproject.toml:fail_under = 100under[tool.coverage.report]; any--cov*flags removed fromaddopts.justfile:test-cimeasures coverage and writes the XML report without the flag;test-branchlikewise. Wheretest-cidid not exist it is added, and CI now calls it..github/workflows/_checks.yml(where present): the pytest step runsjust test-ci.Checklist
ruff) — config and recipes onlyty) — no Python changedjust test-ci, which is the gate