Skip to content

chore(coverage): declare the gate in [tool.coverage.report] and measure only in test-ci - #17

Merged
lesnik512 merged 1 commit into
mainfrom
coverage-gate
Sep 12, 2026
Merged

chore(coverage): declare the gate in [tool.coverage.report] and measure only in test-ci#17
lesnik512 merged 1 commit into
mainfrom
coverage-gate

Conversation

@lesnik512

Copy link
Copy Markdown
Member

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 by just test-ci (and test-branch), never on every run through pytest addopts.

pytest-cov reads fail_under from the coverage config when no --cov-fail-under flag is given and applies it whenever coverage is measured, so the gate fires in test-ci exactly as before and a targeted just test run stays gate-free. coverage special-cases 100: the total must really be 100, no rounding.

Changes

  • pyproject.toml: fail_under = 100 under [tool.coverage.report]; any --cov* flags removed from addopts.
  • justfile: test-ci measures coverage and writes the XML report without the flag; test-branch likewise. Where test-ci did not exist it is added, and CI now calls it.
  • .github/workflows/_checks.yml (where present): the pytest step runs just test-ci.

Checklist

  • Lint and format pass (ruff) — config and recipes only
  • Type check passes (ty) — no Python changed
  • Tests pass and new behavior is covered — CI runs just test-ci, which is the gate
  • Build succeeds — no packaging change
  • Repo metadata stays consistent across the three surfaces — untouched

@lesnik512
lesnik512 merged commit fe0f4a8 into main Sep 12, 2026
7 checks passed
@lesnik512
lesnik512 deleted the coverage-gate branch September 12, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant