-
Notifications
You must be signed in to change notification settings - Fork 10
Checking for the code coverage
Jean-Noël Grad edited this page Sep 12, 2024
·
2 revisions
pyMBE uses Codecov to analyze the coverage of the code of the module. The code coverage reports are now uploaded to https://app.codecov.io/gh/pyMBE-dev/pyMBE and written to the commit status (green checkmark or red cross).
One can generate the code coverage report locally with the following commands:
make -j8 unit_tests COVERAGE=1
make coverage_html
xdg-open coverage/index.html
New features require a unit test, otherwise code coverage will drop and CI will fail. Keep in mind that:
- for branches from the pyMBE-dev repository, the secret token is used, and uploads always succeed
- for PRs from forks, the secret token isn't revealed for security reasons, and tokenless mode is used: uploads may fail
- GitHub has a shared pool of free actions for tokenless users; when exhausted, wait for it to refill and re-run job
- action log:
Upload failed: {"detail":"Tokenless has reached GitHub rate limit. Please upload using a token: https://docs.codecov.com/docs/adding-the-codecov-token. Expected available in 358 seconds."}