Opened 2 months ago

Last modified 4 days ago

#36620 new Cleanup/optimization

Automate test coverage check on pull requests

Reported by: Jacob Walls Owned by: Saurabh
Component: Core (Other) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

We could automate a significant part of checking test coverage on pull requests. Instead of using a cloud service, there's an implementation using diff-cover in a PR.

PR

Forum post

Change History (11)

comment:1 by Jacob Walls, 2 months ago

Owner: set to Saurabh
Status: newassigned

comment:2 by Simon Charette, 2 months ago

I think the last time this was attempted the efforts stalled due the difficulty of combining coverage reports from different suite runs. Some part of the code is only covered by tests run on Postgres or a particular Python version for example so there needs to be a coordinated job that collects all of the .coverage artifacts and then combine them otherwise the resulting coverage report will be lacking or improperly reporting that some areas are not covered (e.g. if we only use the SQLite test run and Postgres only changes are introduced).

comment:3 by Jacob Walls, 2 months ago

(The linked implementation just treats that complexity as outside of MVP and makes this caveat explicit in the posted comment.)

comment:4 by Sarah Boyce, 2 months ago

Triage Stage: UnreviewedAccepted

comment:5 by Sarah Boyce, 2 months ago

Needs documentation: set
Patch needs improvement: set

comment:6 by Jacob Walls, 9 days ago

Needs documentation: unset
Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:7 by Jacob Walls, 9 days ago

Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

comment:8 by Jacob Walls, 8 days ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:9 by Jacob Walls <jacobtylerwalls@…>, 8 days ago

Resolution: fixed
Status: assignedclosed

In a89183e6:

Fixed #36620 -- Added coverage workflow to summarize coverage in pull requests.

Part of GSoC 2025. Thanks Lily for mentorship, and Sarah Boyce and
Jacob Walls for reviews.

comment:10 by Jacob Walls <jacobtylerwalls@…>, 4 days ago

In e4c4a17:

Reverted "Fixed #36620 -- Added coverage workflow to summarize coverage in pull requests."

This reverts commit a89183e63844a937aacd3ddb73c4952ef869d2cc.

comment:11 by Jacob Walls, 4 days ago

Patch needs improvement: set
Resolution: fixed
Status: closednew
Triage Stage: Ready for checkinAccepted

Revision is being progressed here: https://github.com/django/django/pull/20302

Note: See TracTickets for help on using tickets.
Back to Top