fix: add --cov flags to Windows CI pytest command, fixes #9418#9419
fix: add --cov flags to Windows CI pytest command, fixes #9418#9419mr-raj12 wants to merge 3 commits intoborgbackup:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9419 +/- ##
==========================================
+ Coverage 76.47% 76.50% +0.03%
==========================================
Files 85 85
Lines 14803 14818 +15
Branches 2213 2214 +1
==========================================
+ Hits 11321 11337 +16
Misses 2803 2803
+ Partials 679 678 -1 ☔ View full report in Codecov by Sentry. |
| borg.exe -V | ||
| . env/bin/activate | ||
| python -m pytest -n4 --benchmark-skip -vv -rs -k "not remote" --junitxml=test-results.xml | ||
| python -m pytest -n4 --benchmark-skip -vv -rs -k "not remote" --cov=borg --cov-config=pyproject.toml --junitxml=test-results.xml |
There was a problem hiding this comment.
good catch.
but why does it say the test coverage of the project did change by 0%? shouldn't we see an increase due to this change?
There was a problem hiding this comment.
does not show coverage for win32. also not for some others.
There was a problem hiding this comment.
trying few tweaks before final squash and force push
There was a problem hiding this comment.
now it looks better for win32.
.github/workflows/ci.yml
Outdated
| files: coverage.xml | ||
| flags: windows |
There was a problem hiding this comment.
why are these needed? the corresponding linux action does not have these lines.
There was a problem hiding this comment.
removed them in latest push and it just matches the Linux setup , waiting on CI to confirm codecov picks it up
.github/workflows/ci.yml
Outdated
| borg.exe -V | ||
| . env/bin/activate | ||
| python -m pytest -n4 --benchmark-skip -vv -rs -k "not remote" --cov=borg --cov-config=pyproject.toml --junitxml=test-results.xml | ||
| python -m pytest -n4 --benchmark-skip -vv -rs -k "not remote" --cov=borg --cov-config=pyproject.toml --cov-report=xml:coverage.xml --junitxml=test-results.xml |
There was a problem hiding this comment.
is --cov-report needed? the linux test run does not have this.
Description
The Windows CI job (
windows_tests) was running pytest without--cov, so Codecov received no coverage data from Windows. Any PR touching Windows-only code would failcodecov/patchwith 0%.Added
--cov=borg --cov-config=pyproject.tomlto the Windows pytest command, matching the flags already used by the Linux/tox-based CI jobs.Fixes #9418
Checklist
master