chore(ci): skip backend test matrices on draft PRs#60703
Merged
Conversation
Contributor
|
Reviews (1): Last reviewed commit: "ci: skip backend test matrices on draft ..." | Re-trigger Greptile |
gantoine
approved these changes
May 29, 2026
webjunkie
reviewed
Jun 1, 2026
Contributor
webjunkie
left a comment
There was a problem hiding this comment.
I'm wondering if the gating is correct already:
Presumable the PR is green in draft, when marking ready this might not invalidate right away?
Contributor
|
Size Change: 0 B Total Size: 80.9 MB ℹ️ View Unchanged
|
Member
Author
|
@webjunkie in this same PR, when switched to |
MattPua
pushed a commit
that referenced
this pull request
Jun 1, 2026
Co-authored-by: tests-posthog[bot] <250237707+tests-posthog[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Roughly 30% of
ci-backendPR-triggered runs over the last 30 days fired while the PR was still a draft — running the full backend test fleet before the author asked for review.Changes
Gates the two heavy job matrices,
djangoandturbo-tests, behindgithub.event.pull_request.draft != true, and addsready_for_reviewto thepull_requesttrigger so they re-run when a PR leaves draft.Django Tests Passalready treatsskippedmatrices as passing, so drafts stay reportable and merge is not blocked once a PR is marked ready.push(master) andmerge_groupare unaffected —draftis null there, so the guard passes.How did you test this code?
I'm an agent (Claude Code) and did not run CI. This is a config-only workflow change; I verified locally that the file parses as YAML and that the new
pull_request.typesare applied. Runtime behavior (matrices skipped on draft, re-run on ready) should be confirmed on this PR.Automatic notifications
🤖 Agent context
Authored by Claude Code at @rnegron's request. The draft-vs-ready split was measured from the GitHub Actions API (ci-backend PR runs mapped to each PR's draft state at run time).
Gated only the two expensive matrices rather than the whole workflow, so fast feedback survives on drafts. Relies on the existing
Django Tests Passsummary (skipped needs count as pass) to avoid a required-check deadlock. The repo has no merge queue enabled (merge_group:triggers are currently inert), so the safety net for deferred tests is the required checks on the ready PR plus the post-merge master run. Requires human review; not for self-merge.