-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Fixed #36620 -- Added coverage workflow to comment coverage summary. #19777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR
In the forum I recently mentioned that I think it's worth adding some information on this in our contributing docs
Perhaps we should update the existing code coverage docs in the contributing section to add information on this GitHub action: https://docs.djangoproject.com/en/5.2/internals/contributing/writing-code/unit-tests/#code-coverage
@@ -0,0 +1,102 @@ | |||
name: Coverage (Trial) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name: Coverage (Trial) | |
name: Coverage |
paths-ignore: | ||
- 'docs/**' | ||
- '**/*.md' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
paths-ignore: | |
- 'docs/**' | |
- '**/*.md' | |
paths: | |
- 'django/**/*.py' |
perhaps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't it make the workflow much more restrictive?
It would miss legitimate triggers where coverage behavior might change (e.g., adding new test utilities, updating dependencies, modifying test configuration)?
} | ||
|
||
- name: Post/update PR comment | ||
if: success() && github.event_name == 'pull_request_target' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the workflow_dispatch
event? If we remove that would we be able to simplify this?
Thanks for the points, will update as soon as I can. |
Part of GSoC'25
ticket-36620
This PR adds a new GitHub Actions workflow i.e.
coverage.yml
for testing coverage reporting with diff-cover analysis.What it does:
Links:
Implementation:
Checklist
main
branch.