Skip to content

ci(ci): skip the tests workflow on draft pull requests - #234

Merged
aitianshi merged 2 commits into
mainfrom
ci/skip-tests-on-drafts
Nov 19, 2026
Merged

aitianshi merged 2 commits into
mainfrom
ci/skip-tests-on-drafts

Conversation

@aitianshi

@aitianshi aitianshi commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #233

What

The tests workflow skips draft pull requests. It runs again when a draft is marked ready for review, and still runs by hand. This matches what the PR judge already does.

Touches

  • .github/workflows/tests.yml: adds ready_for_review to the pull_request types, and the job condition github.event_name != 'pull_request' || !github.event.pull_request.draft
  • AGENTS.md: the CI paragraph is now one line per workflow, saying what each runs and when (drafts skipped)

Verified

  • The workflow YAML parses.
  • actionlint runs in this workflow, so this PR's own run checks the changed condition.
  • This PR is opened ready (not as a draft), so tests should run on it.
  • Not checked: the skip on a real draft. Open any draft PR after merge: tests should show as skipped, then run when marked ready.

Risk

  • If tests is a required check, a skipped job counts as passing. A draft can't be merged anyway, and marking it ready runs the real job.
  • A draft gets no test feedback until it is marked ready. To get it earlier: Actions → tests → Run workflow on the branch.
  • Undo: revert this commit.

Run it again when a draft is marked ready, and keep the manual trigger. The PR judge already skips drafts.
@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown

🔴 PR judge · 5 of 7 yes · #234 ↔ #233

Merge risk ⛔ SEVERE a workflow changed: .github/workflows/tests.yml
Priority 🔴 EXTREME the deepest path is .github/workflows/tests.yml
Question Verdict
Changes do what the issue asks · 4 of 4 criteria ✅ yes
Issue and pull request describe the same change ✅ yes
Description matches the diff, no more, no less ✅ yes
Diff stays in scope ❔ undecided
Tests cover the change, or Verified says how ⚠️ partly
Docs follow the change ✅ yes
Risk named in the description ✅ yes
Before and after shown –
Acceptance criteria, 4 of 4 met
# Criterion Verdict
1 tests does not run its job for a draft pull request ✅ met
2 tests runs when a draft is marked ready for review ✅ met
3 tests still runs by hand (workflow_dispatch) ✅ met
4 AGENTS.md's CI description says drafts are skipped ✅ met
Checks the script runs itself, 4 of 4 pass
No machine attribution trailer in the commits or the description ✓
New code under app/, docs/, .github/ or .claude/ ✓
No Flask import under the backend package ✓
No key-shaped string in the diff ✓

@aitianshi
aitianshi merged commit 9c6f5ef into main Nov 19, 2026
2 checks passed
@aitianshi
aitianshi deleted the ci/skip-tests-on-drafts branch November 19, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tests run on draft pull requests

1 participant