MeltanoLabs / Meta

The why, what, and how of MeltanoLabs
MIT License
5 stars 1 forks source link

Code coverage in SonarCloud or another coverage tool #12

Open aaronsteers opened 2 years ago

aaronsteers commented 2 years ago

@pnadolny13 and @tayloramurphy - I love the new SonarCloud bot checkups. Have either of you looked into enabling code coverage for Python code files? I looked into this myself but didn't get very far.

Cc @edgarrmondragon

edgarrmondragon commented 2 years ago

@aaronsteers I think for SonarCloud to pick up coverage, an XML report has to be produced by some other tool.

Something like:

$ coverage run -m pytest -x
...

$ coverage xml
Wrote XML report to coverage.xml
aaronsteers commented 2 years ago

Thanks, @edgarrmondragon . That makes sense.

@pnadolny13 - Do we have a central place where we can modify job definitions for the MeltanoLabs org, or would this need to happen once per repo?

pnadolny13 commented 2 years ago

@aaronsteers from a quick look through the docs and some tutorials it seems to me like we have the automated github integration installed right now and in order to add coverage we need to turn that off (or maybe theres overlap, idk) and use github actions to manage Sonar directly. So it looks like it would require each repo to be configured individually. Also only @tayloramurphy is admin on our SonarCloud account right now since he set it up.