nimi-python
nimi-python copied to clipboard
Add code coverage check to PR build
We currently use coverage
tool to report the code coverage from unit and system tests. See
e.g:
https://github.com/ni/nimi-python/blob/266e87f372e27d4a05cbc637b0bbe8e5dc305726/generated/nidcpower/tox-system_tests.ini#L32
https://github.com/ni/nimi-python/blob/266e87f372e27d4a05cbc637b0bbe8e5dc305726/tox-travis.ini#L46
Logs:
- https://app.travis-ci.com/github/ni/nimi-python/jobs/576582446#L2052
- https://github.com/ni/nimi-python/runs/7326743697?check_suite_focus=true#step:3:1027
We should looking into setting a threshold and have the PR build fail if the coverage is below it.
If we do set a threshold, we may need to combine the coverage for the unit tests and session tests for some files, first, as @bkeryan suggested in https://github.com/ni/nimi-python/issues/2015#issuecomment-1723637342 (perform the check as a final step after all of our other checks).