From f8f20d12969ac9cbdd74c62a2d0a5572e113bb09 Mon Sep 17 00:00:00 2001 From: Matthew Fishman Date: Wed, 6 May 2026 20:21:00 -0400 Subject: [PATCH] IntegrationTest: skip aggregate gate on draft PRs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The matrix-driven `integration-test` job already skips on `draft + run-on-draft=false`, but the aggregate `gate` job ran unconditionally (`if: always()`) and its script's `RESULT=skipped` + non-empty `pkgs` branch — designed for the unexpected all-skipped case — fired with `Integration matrix unexpectedly all skipped`, turning the `IntegrationTest` check Red on every draft PR. Mirror the matrix-leg's draft predicate on the gate so the gate is itself Skipped on draft + `run-on-draft=false`. The check appears as Skipped (not Failure) on the PR view, which matches the intent of the draft skip — no signal expected, no error reported. Non-draft PRs are unaffected. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/IntegrationTest.yml | 6 +++++- README.md | 8 +++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/IntegrationTest.yml b/.github/workflows/IntegrationTest.yml index a513ec1..028c9c9 100644 --- a/.github/workflows/IntegrationTest.yml +++ b/.github/workflows/IntegrationTest.yml @@ -221,6 +221,10 @@ jobs: # that branch protection can require. Behavior: # - matrix succeeded -> pass # - `pkgs: '[]'` -> pass (no downstream configured) + # - draft + run-on-draft=false -> skip (matches the matrix-leg's draft + # skip; gate appears as Skipped on the PR + # rather than Failure for the expected + # no-signal case) # - matrix all-skipped + fork -> fail with /integrationtest hint # - any failure -> fail # The fork-PR-all-skipped case is the trigger for the manual @@ -229,7 +233,7 @@ jobs: gate: name: "IntegrationTest" needs: integration-test - if: ${{ always() }} + if: ${{ always() && (!github.event.pull_request.draft || inputs.run-on-draft) }} runs-on: ubuntu-latest permissions: actions: read diff --git a/README.md b/README.md index f1c46fc..b5c12d1 100644 --- a/README.md +++ b/README.md @@ -567,9 +567,11 @@ success, satisfying the gate. ### Draft PR behavior -By default, integration tests are skipped entirely for draft PRs. This is -controlled by the `run-on-draft` input (default: `false`). To run integration -tests even on draft PRs, set it to `true`: +By default, integration tests are skipped entirely for draft PRs. The matrix +legs and the aggregate `IntegrationTest` gate both report as Skipped (not +Failure) — the no-signal case on a draft is treated as expected, not a fault. +This is controlled by the `run-on-draft` input (default: `false`). To run +integration tests even on draft PRs, set it to `true`: ```yaml uses: "ITensor/ITensorActions/.github/workflows/IntegrationTest.yml@v2"