aloof-tent-90836
07/19/2022, 11:06 AMcoverage combine && coverage xml
to join coverage data files from different GitHub action workers) within venv
created by Pants (I saw no `test`/`pytest`/`coverage-py` names in cache folder but hashes).
Is there any way to invoke this command in a Pants-way?hundreds-father-404
07/19/2022, 12:41 PMhappy-kitchen-89482
07/19/2022, 3:07 PMhappy-kitchen-89482
07/19/2022, 3:09 PMhappy-kitchen-89482
07/19/2022, 3:09 PMhappy-kitchen-89482
07/19/2022, 3:10 PMhappy-kitchen-89482
07/19/2022, 3:12 PMhappy-kitchen-89482
07/19/2022, 3:13 PMaloof-tent-90836
07/19/2022, 3:45 PM.coverage
with hash suffixes (to be distinctive) and upload artefacts using actions/upload-artifact@v3 and having dedicated job actions/download-artifact@v3 further (the main trick is not providing any args - then all coverage files will be merged in the same destination).
Pants cache is also shared between jobs within the same workflow.
So, I've combined coverage result in this command sequence:
⢠coverage combine
⢠coverage report`
⢠coverage xml (to be compatible to push data to SonarCloud, probably, "push results" feature would be a nice addition to coverage-py
)
But, in orded to be compatible, I've manually pin the coverage version and it can be eventually out of sync because now we have two places to lock dependencies. It would be nice to have some ability to reuse the same coverage executable that was used in testing stage.
P.S. feel free to ask the same again if things above did not provide answers to you šhappy-kitchen-89482
07/19/2022, 10:01 PMhappy-kitchen-89482
07/19/2022, 10:01 PMhappy-kitchen-89482
07/19/2022, 10:02 PMmerge-coverage
goal that you pass paths that are not targets.happy-kitchen-89482
07/19/2022, 10:03 PMaloof-tent-90836
07/20/2022, 11:31 AMOn some GitHub Actions job that depends on those other jobs it sounds like? And it downloads them via GHA artifacts?Yes, correct.
Something like a customThank you, I will look into. Would be helpful if you have can provide any link to the guide.goal that you pass paths that are not targets.merge-coverage
steep-eve-20716
08/05/2024, 7:24 PMcoverage_0.xml
)
3. coverage-py
could add a goal i.e. merge-coverage
which merges all *.xml
files in [coverage-py].output_dir