[Django] #36620: Automate test coverage check on pull requests

7 views
Skip to first unread message

Django

unread,
Sep 25, 2025, 1:01:34 PM (6 days ago) Sep 25
to django-...@googlegroups.com
#36620: Automate test coverage check on pull requests
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Type:
| Cleanup/optimization
Status: new | Component: Core
| (Other)
Version: dev | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
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.

[https://github.com/django/django/pull/19777 PR]

[https://forum.djangoproject.com/t/rfc-prioritizing-tasks-for-automate-
processes-within-django-contribution-workflow-gsoc-2025/41960 Forum post]
--
Ticket URL: <https://code.djangoproject.com/ticket/36620>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 25, 2025, 1:01:52 PM (6 days ago) Sep 25
to django-...@googlegroups.com
#36620: Automate test coverage check on pull requests
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Saurabh
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* owner: (none) => Saurabh
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/36620#comment:1>

Django

unread,
Sep 25, 2025, 1:17:33 PM (6 days ago) Sep 25
to django-...@googlegroups.com
#36620: Automate test coverage check on pull requests
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Saurabh
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Simon Charette):

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
[https://coverage.readthedocs.io/en/7.10.7/commands/cmd_combine.html 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).
--
Ticket URL: <https://code.djangoproject.com/ticket/36620#comment:2>

Django

unread,
Sep 25, 2025, 2:02:35 PM (6 days ago) Sep 25
to django-...@googlegroups.com
#36620: Automate test coverage check on pull requests
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Saurabh
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jacob Walls):

(The linked implementation just treats that complexity as outside of MVP
and makes this caveat explicit in the posted comment.)
--
Ticket URL: <https://code.djangoproject.com/ticket/36620#comment:3>

Django

unread,
Sep 29, 2025, 3:03:50 AM (2 days ago) Sep 29
to django-...@googlegroups.com
#36620: Automate test coverage check on pull requests
--------------------------------------+------------------------------------
Reporter: Jacob Walls | Owner: Saurabh
Type: Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Sarah Boyce):

* stage: Unreviewed => Accepted

--
Ticket URL: <https://code.djangoproject.com/ticket/36620#comment:4>

Django

unread,
Sep 30, 2025, 4:22:03 AM (yesterday) Sep 30
to django-...@googlegroups.com
#36620: Automate test coverage check on pull requests
--------------------------------------+------------------------------------
Reporter: Jacob Walls | Owner: Saurabh
Type: Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Sarah Boyce):

* needs_better_patch: 0 => 1
* needs_docs: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/36620#comment:5>
Reply all
Reply to author
Forward
0 new messages