feat(ci): add coverage.py measurement and 82% threshold enforcement#278
Merged
Conversation
7ea61e9 to
8549329
Compare
…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>
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
pytest-covto pixi dependencies and wires coverage measurement into every test run viapyproject.tomladdoptsfail_under = 82) — measured baseline is 85%, buffer guards against regressionstest-unitpixi task and updatedjust testrecipe give developers and CI an identical invocationunit-testsjob inci.ymlrunspixi run test-unitand uploadscoverage.xmlas a downloadable artifact.gitignoreupdated to exclude generated coverage artifactsTest plan
pixi run test-unitexits 0 — 102 tests pass, 85% coverage ≥ 82% thresholdcoverage.xmlandhtmlcov/generated and gitignored (not shown ingit status)pyproject.tomlparses without error (tomllib.loadexits 0)114-auto-implCloses #114
Part of #100
🤖 Generated with Claude Code