Skip to content

Conversation

seifertm
Copy link
Contributor

@seifertm seifertm commented Sep 19, 2024

Coverage writes reports to ".coverage" by default. The GitHub action "upload-artifact" no longer includes hidden files by default. This patch changes the coverage file name to a non-hidden file path.

This fixes the failing CI pipeline for pull requests.

If we simply emit a warning (the default), the pipeline will fail during the check step when trying to combine the coverage data. By changing this from warning to error, we fail the pipeline earlier and save time debugging issues.
@seifertm seifertm force-pushed the fix-coverage-upload branch 5 times, most recently from 1fa7409 to fd32446 Compare September 19, 2024 06:02
@codecov-commenter
Copy link

codecov-commenter commented Sep 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.10%. Comparing base (fb5422f) to head (cd06de6).
Report is 20 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #941      +/-   ##
==========================================
- Coverage   91.30%   91.10%   -0.20%     
==========================================
  Files           2        2              
  Lines         506      506              
  Branches       98       98              
==========================================
- Hits          462      461       -1     
- Misses         26       27       +1     
  Partials       18       18              

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

Coverage writes coverage reports to ".coverage" by default. The GitHub action "upload-artifact" no longer includes hidden files by default. This patch changes the coverage file name to a non-hidden file path.
@seifertm seifertm changed the title Fix coverage upload Address invisible hidden files in artifact upload action Sep 19, 2024
@seifertm seifertm marked this pull request as ready for review September 19, 2024 06:13
@Tinche
Copy link
Member

Tinche commented Sep 19, 2024

Nb: you could have also reenabled hidden file upload in the action with a flag

@seifertm
Copy link
Contributor Author

@Tinche Thanks for the review!

Before this PR, each tox environment created its own coverage file in the project root directory. They don't get overwritten either, so the developer has to clean up the files manually every now and then. I found this a bit annoying.

I considered the include-hidden-files option for actions/upload-artifact, but I saw this as a chance to group the coverage files for each tox environment into a single folder to avoid messing up the file explorer for devs :)

@seifertm seifertm added this pull request to the merge queue Sep 19, 2024
Merged via the queue into pytest-dev:main with commit 32af838 Sep 19, 2024
17 checks passed
@seifertm seifertm deleted the fix-coverage-upload branch September 19, 2024 07:55
@seifertm seifertm restored the fix-coverage-upload branch October 23, 2024 16:59
@seifertm seifertm deleted the fix-coverage-upload branch October 30, 2024 19:35
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