Skip to content

Report unit and integration test coverage separately - #17

Merged
chrisjkuch merged 3 commits into
mainfrom
coverage-reports
Nov 19, 2026
Merged

chrisjkuch merged 3 commits into
mainfrom
coverage-reports

Conversation

@jayqi

@jayqi jayqi commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator
  • Collect coverage in the integration suite by running it with the pytest config in pyproject.toml. Branch coverage moves to [tool.coverage.run] so both suites use it.
    • The separate integration_tests/pytest.ini is removed. It kept the unit suite's coverage options out, which no longer matters now that both suites collect coverage the same way. It also wasn't needed to keep the autouse responses fixture in tests/conftest.py off the integration tests, since pytest applies conftest fixtures only to tests in that conftest's directory.
  • Upload each test job's coverage data, and add a Coverage job that reports each suite separately. Unit coverage is combined across the Python matrix.
  • The Coverage job:
    • prints a report with missing lines to the log, and adds a table for each suite to the run summary
    • uploads coverage-html (an HTML report per suite) and coverage-json (unit.json and integration.json)
    • merges the per-job data into one coverage-data artifact, one directory per job
  • Add Coverage to all-green and notify.
  • Document the artifacts in CONTRIBUTING.md.

Unit and integration coverage stay separate so it's clear what each suite covers. The unit tests mock every HTTP call, so a line covered only by unit tests has never run against PDC.

Assisted by Claude Code

Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
@jayqi
jayqi requested a review from chrisjkuch November 19, 2026 02:21
Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
@chrisjkuch
chrisjkuch merged commit d31f93a into main Nov 19, 2026
8 checks passed
@chrisjkuch
chrisjkuch deleted the coverage-reports branch November 19, 2026 06:55
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.

2 participants