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
thekaveman opened this issue
Aug 16, 2023
· 1 comment
Assignees
Labels
actionsRelated to GitHub Actions workflowschoreChores and tasks for code cleanup, dev experience, admin/configuration settings, etc.testsRelated to automated testing (unit, UI, integration, etc.)
However, within a given PR or set of changes we don't get much 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.
The text was updated successfully, but these errors were encountered:
thekaveman
added
chore
Chores and tasks for code cleanup, dev experience, admin/configuration settings, etc.
tests
Related to automated testing (unit, UI, integration, etc.)
actions
Related to GitHub Actions workflows
labels
Aug 16, 2023
actionsRelated to GitHub Actions workflowschoreChores and tasks for code cleanup, dev experience, admin/configuration settings, etc.testsRelated to automated testing (unit, UI, integration, etc.)
We use the
coverage
package (indirectly viapytest-cov
) to calculate Python unit test coverage of the codebase.The test runner generates a coverage report, the latest always available on our docs site at: https://docs.calitp.org/benefits/tests/coverage
However, within a given PR or set of changes we don't get much 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
coverage
directly rather than viapytest-cov
pyproject.toml
to configurecoverage
relative_files = true
pytest
actions workflow to usePython Coverage Comment
to provide coverage diff reporting, exampleAdditional context
Example of this setup
The text was updated successfully, but these errors were encountered: