ci: add Codecov coverage reporting#21
Conversation
Mirrors mcp-clipboard's Codecov integration: - pyproject.toml: pytest-cov>=7.0 in dev extras, [tool.coverage.run] scoped to the yt_dont_recommend package, [tool.coverage.report] with show_missing + skip_empty. - .github/workflows/ci.yml: swap `pytest tests/ -v` for `pytest --cov --cov-report=xml`; add codecov/codecov-action@v5 upload step gated on matrix.os == 'ubuntu-latest' so we only upload once per CI run. Token via secrets.CODECOV_TOKEN (already configured on the repo). fail_ci_if_error: false so Codecov flakiness doesn't break CI. - README.md: Coverage badge slotted between CI and Downloads. Verified locally: 259/259 pass under pytest-cov; coverage.xml generated. Baseline overall coverage ~44% — heavily dragged by browser.py (7%, Playwright-dependent) and diagnostics.py (0%). Core business modules are healthier: blocklist.py 86%, clickbait.py 87%, unblock.py 83%, scheduler.py 70%. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
cmeans
left a comment
There was a problem hiding this comment.
[QA] Review — zero findings, Ready for QA Signoff.
What passed
| Check | Result |
|---|---|
uv sync --extra dev (local equivalent: pip install pytest-cov>=7.0) |
Resolves cleanly |
pytest --cov --cov-report=xml |
259/259 pass; coverage.xml written (~105 KB, Cobertura schema). Overall line-rate ≈ 0.4368 — matches Dev's claimed ~44% baseline. |
ruff check src/ tests/ |
All checks passed! |
pyproject.toml additions |
pytest-cov>=7.0 added to dev extras; [tool.coverage.run] and [tool.coverage.report] follow the standard coverage.py schema. |
ci.yml diff |
Run tests with coverage step invokes pytest --cov --cov-report=xml; new Upload coverage to Codecov step uses codecov/codecov-action@v5, fail_ci_if_error: false, token via secrets.CODECOV_TOKEN. |
| mcp-clipboard parity | mcp-clipboard gates on matrix.python-version == '3.13'; this PR gates on matrix.os == 'ubuntu-latest' because yt-dont-recommend doesn't matrix Python. Single upload per CI run — same intent via a different single-axis gate. |
| Coverage badge | [](https://codecov.io/gh/cmeans/yt-dont-recommend) — standard codecov.io schema; position between CI and Downloads matches mcp-clipboard's order. |
Findings
None.
Verdict
Applying Ready for QA Signoff. The two post-merge checkboxes (Codecov upload on main + Coverage badge resolving) require data to land at Codecov and are genuinely unverifiable pre-merge — leaving them for the maintainer.
Heads-up: this PR and #22 both touch pyproject.toml (different sections — dev extras + [tool.coverage.*] here, license + authors + classifiers there). The second to merge will want a rebase. No merge-order labels applied — deferring that call to you.
|
Dev action items (post-signoff):
|
Summary
Mirrors mcp-clipboard's Codecov integration. Requested by @cmeans after the mcp-* alignment planning — `CODECOV_TOKEN` is already configured as a repo secret on this repo.
What changed
`pyproject.toml`
`.github/workflows/ci.yml`
`README.md`
Verification (local)
Test plan (QA)
Out of scope
🤖 Generated with Claude Code