Skip to content

feat(ci): add coverage.py measurement and 82% threshold enforcement#278

Merged
mvillmow merged 2 commits into
mainfrom
114-auto-impl
May 10, 2026
Merged

feat(ci): add coverage.py measurement and 82% threshold enforcement#278
mvillmow merged 2 commits into
mainfrom
114-auto-impl

Conversation

@mvillmow
Copy link
Copy Markdown
Contributor

@mvillmow mvillmow commented May 4, 2026

Summary

  • Adds pytest-cov to pixi dependencies and wires coverage measurement into every test run via pyproject.toml addopts
  • Enforces an 82% branch-coverage threshold (fail_under = 82) — measured baseline is 85%, buffer guards against regressions
  • New test-unit pixi task and updated just test recipe give developers and CI an identical invocation
  • New unit-tests job in ci.yml runs pixi run test-unit and uploads coverage.xml as a downloadable artifact
  • .gitignore updated to exclude generated coverage artifacts

Test plan

  • pixi run test-unit exits 0 — 102 tests pass, 85% coverage ≥ 82% threshold
  • coverage.xml and htmlcov/ generated and gitignored (not shown in git status)
  • pyproject.toml parses without error (tomllib.load exits 0)
  • All changes committed to branch 114-auto-impl

Closes #114
Part of #100

🤖 Generated with Claude Code

@mvillmow mvillmow enabled auto-merge (squash) May 5, 2026 00:53
@mvillmow mvillmow force-pushed the 114-auto-impl branch 5 times, most recently from 7ea61e9 to 8549329 Compare May 10, 2026 02:33
mvillmow and others added 2 commits May 9, 2026 19:53
…114)

Integrates pytest-cov into the test suite and CI pipeline so that branch
gaps in exporter/exporter.py (especially error paths in collect()) are
automatically detectable. Baseline measured at 85%; threshold set to 82%
as a regression buffer.

- pyproject.toml: new file with [tool.pytest.ini_options] (--cov flags),
  [tool.coverage.run] (branch=true), and [tool.coverage.report]
  (fail_under=82, standard exclude_lines)
- pixi.toml: adds pytest-cov>=5.0 dependency and test-unit task
- justfile: test recipe delegates to pixi run test-unit
- ci.yml: new unit-tests job runs pixi run test-unit and uploads
  coverage.xml as a workflow artifact
- .gitignore: excludes .coverage, htmlcov/, coverage.xml, .pytest_cache/

Closes #114

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ixi.lock

- Close unclosed parenthesis in test_loki_datasource_url_uses_proxy
  (SyntaxError causing pytest collection failure)
- Regenerate pixi.lock with pixi v0.67.2 after adding pytest-cov dependency

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mvillmow mvillmow merged commit 096e027 into main May 10, 2026
15 of 17 checks passed
@mvillmow mvillmow deleted the 114-auto-impl branch May 10, 2026 02:54
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.

[MAJOR] §5: No test coverage measurement in CI

1 participant