Upload junit reports codecov
Description
This PR automates uploading JUnit reports to codecov in the test pipeline. An example pipeline run with the changes can be found here (https://github.com/aleguy02/fork-pytest/actions/runs/18184970357). An example of what the codecov UI looks like with these changes can be found here (https://app.codecov.io/gh/aleguy02/fork-pytest/tests).
Closes #12689
Checklist
- [ ] Include documentation when adding new features.
- [ ] Include new tests or update existing tests when applicable.
- [X] Allow maintainers to push and squash when merging my commits. Please uncheck this if you prefer to squash the commits yourself.
Additional Notes
I didn't create a changelog since the documented behavior of pytest was not modified.
Do you recommend doing this because it is cleaner to have the entire CLI flag in one place instead of splitting it across the workflow and tox.ini file? If so that makes perfect sense (I'm asking for my personal learning) @webknjaz
Do you recommend doing this because it is cleaner to have the entire CLI flag in one place instead of splitting it across the workflow and tox.ini file? If so that makes perfect sense (I'm asking for my personal learning)
Perhaps. But this is more due to the fact that configuration should be where it belongs. If you add a --junitxml= to tox.ini, that configuration will also be picked up in local runs, when the contributors invoke tox on their computers. Setting it only in CI prevents that.