Description
Add code coverage to the phylum-dev/phylum-ci repository for the phylum-ci package. This is both for computing code coverage and enforcing it.
Additional Details
- Compute the code coverage automatically in a workflow
- The
Test workflow is a likely candidate since it could also be the place to fail the build if coverage drops
- Provide a report as an artifact...even when the build fails
- HINT: use the
always() logic in GHA for this
- Fail the build if coverage drops below a set threshold
- Not sure what is normal here...maybe 80% ???
- Might also be okay to just ensure coverage does not decrease
- HINT: use the actions/checkout action,
ref input to check both the main branch and the current ref to get a diff
- Expose the ability to compute coverage locally
- Adding to the test(s) tox environments is a good bet here
- Consider the
pytest-cov package/extension for integrating easily with the existing pytest package
Acceptance Criteria
Description
Add code coverage to the
phylum-dev/phylum-cirepository for thephylum-cipackage. This is both for computing code coverage and enforcing it.Additional Details
Testworkflow is a likely candidate since it could also be the place to fail the build if coverage dropsalways()logic in GHA for thisrefinput to check both themainbranch and the current ref to get a diffpytest-covpackage/extension for integrating easily with the existingpytestpackageAcceptance Criteria