Skip to content

Coverage Reporting — Upload and Job Summary #35

@AuraMindNest

Description

@AuraMindNest

Problem

Even with a local coverage gate, CI needs to report coverage results in a way that is visible on pull requests and trackable over time. The repo currently has no coverage upload step and no human-readable summary in the GitHub Actions job output. Coverage tooling (pytest-cov, coverage config, dev/CI dependencies) must be properly wired in pyproject.toml.

Acceptance Criteria

  • CI workflow includes a coverage upload step — either Codecov (via codecov/codecov-action) or as a GitHub Actions artifact (actions/upload-artifact with the .coverage / coverage.xml file)
  • The CI job produces a readable coverage summary in the job output (either via --cov-report=term-missing in the pytest step or via a dedicated coverage report step)
  • pyproject.toml declares pytest-cov and coverage[toml] in the dev dependency group
  • [tool.coverage.run] and [tool.coverage.report] sections are present in pyproject.toml with correct source, omit, and show_missing = true
  • If using Codecov, the CODECOV_TOKEN secret is documented in the README as a required repository secret
  • Coverage XML output (--cov-report=xml:coverage.xml) is generated for upload compatibility

Implementation Notes

If the team prefers artifact-based reporting over Codecov, use actions/upload-artifact@v4 to upload coverage.xml and htmlcov/. Add a coverage report step after pytest that prints a summary table to the job log. Ensure the --cov-report flags in the pytest command produce both terminal output (for the job log) and XML (for upload). The [tool.coverage.report] section should set fail_under = 90 as a secondary gate (belt and suspenders with --cov-fail-under).

References

  • Related files: .github/workflows/ci.yml (or equivalent), pyproject.toml
  • Depends on: Tests and coverage gate item (above)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions