chore: add coverage reporting to pytest #17
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add
pytest-covtorequirements-dev.txtand enable coverage reporting inrun_tests.pyby including--covand--cov- report=xmloptions. This provides insight into code coverage, helping to identify areas lacking test coverage.This pull request enhances the project's test coverage reporting by integrating the
pytest-covplugin and updating the CI workflow to upload coverage reports only for Python 3.12. The main changes focus on generating and uploading code coverage data as part of the testing process.Test coverage integration:
pytest-covtorequirements-dev.txtto enable coverage measurement during test runs.run_tests.pyto include coverage arguments (--covand--cov-report=xml) when running tests, generating a coverage report in XML format.CI workflow update:
.github/workflows/ci.ymlto upload coverage to Codecov only for Python 3.12 (instead of 3.11), aligning coverage uploads with the latest supported Python version.