Skip to content

Commit ae2b414

Browse files
paulteehanclaude
andauthored
Fix: don't skip release-to-dev-pypi on [SKIP-TESTS] commits (#2712)
The CI pipeline added in #2710 introduced a [SKIP-TESTS] commit-message gate that bypasses the test matrix while still allowing pre-commit and dev-pypi publish on main. The dev-pypi publish part regressed: when [SKIP-TESTS] skips the `test` job, `release-to-dev-pypi` is also skipped, even though `define-matrix` (its direct dependency) succeeded. Cause: GitHub Actions' default success() check on a job evaluates the *transitive* needs graph, so a skipped ancestor propagates as a non- success. `define-matrix` already guards against this with always() + explicit needs.test.result check; release-to-dev-pypi did not, so it was skipped on bump merges. Mirror the same pattern on release-to-dev-pypi: require define-matrix to have succeeded explicitly, and use always() to bypass the implicit transitive check. Verified failure mode in run 26031647533 (release_20260518_1 bump): - test: skipped (correct — [SKIP-TESTS]) - define-matrix: success - release-to-dev-pypi: skipped (bug — should have run) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 310b0f0 commit ae2b414

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/main.workflow.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,14 @@ jobs:
334334
run: |
335335
echo modules=$(bash scripts/release_matrix.sh) >> "$GITHUB_OUTPUT"
336336
release-to-dev-pypi:
337-
if: github.ref_name == 'main' # Pushes to "main" branch
337+
# Mirror define-matrix's gating: without always() + an explicit
338+
# needs.<job>.result check, GitHub Actions' default success() evaluates
339+
# the *transitive* needs graph — so a [SKIP-TESTS] commit that skips
340+
# `test` also skips this job, defeating the SKIP-TESTS contract
341+
# (dev-pypi publish must still run on main).
342+
if: |
343+
always() && !cancelled() && github.ref_name == 'main'
344+
&& needs.define-matrix.result == 'success'
338345
runs-on: ubuntu-24.04
339346
needs: [define-matrix]
340347
strategy:

0 commit comments

Comments
 (0)