Skip to content

Fix CI coverage for the src layout - #266

Merged
mrbean-bremen merged 1 commit into
pytest-dev:mainfrom
ryanduguid:fix/coverage-package-target
Oct 8, 2026
Merged

mrbean-bremen merged 1 commit into
pytest-dev:mainfrom
ryanduguid:fix/coverage-package-target

Conversation

@ryanduguid

Copy link
Copy Markdown
Contributor

Summary

The coverage job still targets ./pytest_order/, which does not exist with the src layout. Select the installed pytest_order package and map Linux and Windows Tox paths back to src/pytest_order so coverage XML refers to tracked files.

Evidence

  • Before: all six Python 3.13 Tox environments pass 142 tests on Linux, but collect no coverage data and produce no XML.
  • After: the same six environments pass 142 tests each on Linux and Windows. Every XML report includes all five tracked package files, with 668/671 lines and 277/286 branches covered.
  • Installed package contents match the checked source. Applicable pre-commit hooks pass; Python hooks skip these configuration files. git diff --check passes.

Merge danger

Door: two-way. Blast radius: CI.

The change is limited to coverage selection and path mapping. Security scans retain two existing workflow warnings: checkout credential persistence and the unpinned Codecov action.

Unverified

Hosted GitHub Actions and Codecov processing, other Python versions, PyPy and macOS. Full-repository pre-commit, documentation builds and standalone distribution checks were not run.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.21%. Comparing base (7d0355a) to head (fad8f89).

Additional details and impacted files
@@            Coverage Diff            @@
##           main     #266       +/-   ##
=========================================
+ Coverage      0   98.21%   +98.21%     
=========================================
  Files         0        5        +5     
  Lines         0      671      +671     
  Branches      0      143      +143     
=========================================
+ Hits          0      659      +659     
- Misses        0        3        +3     
- Partials      0        9        +9     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mrbean-bremen mrbean-bremen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mrbean-bremen
mrbean-bremen merged commit 3730f4f into pytest-dev:main Oct 8, 2026
16 checks passed
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.

3 participants