-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed Python coverage on GitHub Actions #4371
Conversation
Whilst we're here, Codecov no longer support They used to support both: Shall we switch back in this PR or another? |
Ok, I've added a commit to switch the filename. |
Should the shell be specified for Windows? The default is powershell, I'm guessing PowerShell opened the It looks like there is still no Python coverage from the Docker jobs on GHA, but there is C coverage (You have to unselect all, then select e.g. GHA>amazon-1-amd64; I couldn't find a direct link). Looking back, it was already missing when #4316 was merged. It looks like it is failing to find the Python source code. |
Windows shell: sounds wise to specify the shell rather than relying on the default. GHA has been a bit of a moving target. Docker: interesting, let's deal with that separately, please can you open a new issue? Confirmed in this Docker-only build:
(At the "Docker build" step, it reports coverage on Python files like And that's a good tip about unselecting, thanks. |
Codecov bot commenting means it didn't read |
Ok, I've added a commit to specify the shell for Windows. |
I've added a commit to fix Python coverage on Docker GHA. It can't find the Python files, so I'm moving them into place. However, it tries to look for PIL/_imaging.py, so I added |
Thank you! |
In GitHub Actions, test.yml and test-windows.yml are not reporting Python coverage. This PR fixes that.
For test.yml, the clearest evidence that something is wrong is that macOS code is not covered.
While Travis has a line 'Generating coverage xml reports for Python', GHA has 'Python coveragepy not found'.
Looking at codecov, a way around the 'Python coveragepy not found' error is to provide a coverage.xml file.
So, in
after_success.sh
, we can replacecoverage report
withcoverage xml
to output the data to an XML file.For test-windows.yml, it looks like essentially the 'After success' step was just omitted in #4084. Adding that, in combination with the first part of this PR, adds Python coverage.