You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use the coverage package to calculate Python unit test coverage of the codebase.
When the tests are run in CI, we generate a coverage report, but this doesn't go anywhere and isn't a very useful output for us.
Within a given PR or set of changes, we want more insight of the impact on test coverage -- without manually reviewing coverage reports and eyeballing differences.
The Python Coverage Comment GitHub Action can be used in a workflow to provide coverage diffs for our pytests. The action uses existing coverage metadata generated by the test runner to create a PR comment with information about the change. The comment is updated as the PR changes and new test runs are produced.
We use the
coverage
package to calculate Python unit test coverage of the codebase.When the tests are run in CI, we generate a coverage report, but this doesn't go anywhere and isn't a very useful output for us.
Within a given PR or set of changes, we want more insight of the impact on test coverage -- without manually reviewing coverage reports and eyeballing differences.
The Python Coverage Comment GitHub Action can be used in a workflow to provide coverage diffs for our pytests. The action uses existing coverage metadata generated by the test runner to create a PR comment with information about the change. The comment is updated as the PR changes and new test runs are produced.
Example: comment on a first-time setup PR
Acceptance Criteria
pyproject.toml
to configurecoverage
relative_files = true
pytest
actions workflow to usePython Coverage Comment
to provide coverage diff reporting, exampleAdditional context
Corrollary to cal-itp/benefits#1668
Example of this setup
The text was updated successfully, but these errors were encountered: