Skip to content

ci(coverage): add pytest-cov with 75% branch-coverage floor#25

Merged
ernestprovo23 merged 1 commit into
mainfrom
ci/pr-c-coverage
Jun 9, 2026
Merged

ci(coverage): add pytest-cov with 75% branch-coverage floor#25
ernestprovo23 merged 1 commit into
mainfrom
ci/pr-c-coverage

Conversation

@ernestprovo23

Copy link
Copy Markdown
Member

Summary

  • Adds pytest-cov>=5.0.0 to dev extras in pyproject.toml
  • Adds [tool.coverage.run] (branch=true) and [tool.coverage.report] (fail_under=75, show_missing=true)
  • Updates all three matrix test legs to run with --cov=conclave --cov-fail-under=75

Coverage measurement

Measured branch+statement coverage on current codebase: 76% (66 tests, 790 statements, 214 branches)

Key gaps (not fixed in this PR — coverage improvements are Wave 2+ work):

  • cli.py: 0% — Typer CLI requires subprocess/CliRunner testing, not in scope
  • transport.py: 29% — real HTTP error paths; tests mock at the call_model level

Floor set to 75% — one point below measured — as a non-regression gate that will fail CI if coverage regresses.

Test plan

  • All three matrix pytest legs pass (66 tests + coverage >= 75%)
  • ruff job still passes

Measured branch+statement coverage: 76% (cli.py has 0 coverage as it requires
subprocess/invoke testing; transport.py error paths at 29%). Floor set to 75%
— one point below measured — as a non-regression gate.

- Add pytest-cov>=5.0.0 to dev extras in pyproject.toml
- Add [tool.coverage.run] (branch=true, source=conclave) and
  [tool.coverage.report] (fail_under=75, show_missing=true)
- Update test job to run with --cov=conclave --cov-report=term-missing
  --cov-fail-under=75 on every matrix leg
@ernestprovo23
ernestprovo23 merged commit 9168fbb into main Jun 9, 2026
4 checks passed
@ernestprovo23
ernestprovo23 deleted the ci/pr-c-coverage branch June 10, 2026 00:08
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