From cbfb4b24dcbcdb145f836680a74aa6eccaf7a7a3 Mon Sep 17 00:00:00 2001 From: Anthony Volk Date: Tue, 17 Mar 2026 23:04:56 +0100 Subject: [PATCH] perf: Skip redundant Lint and Test in Phase 2 of push workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 2 only changes version metadata — the code is identical to what was already linted and tested in Phase 1. This saves ~10 min of macOS runner time per release. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/push.yaml | 8 +++++--- changelog.d/skip-phase2-lint-test.changed.md | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 changelog.d/skip-phase2-lint-test.changed.md diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index 8708f232..6db5fec2 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -4,7 +4,8 @@ # Versioning commits with message "Update package version". # The commit pushes to main, re-triggering this workflow for Phase 2. # -# Phase 2 (sentinel commit): Lint + Test → Publish to PyPI + GitHub Release +# Phase 2 (sentinel commit): Publish to PyPI + GitHub Release +# Skips Lint + Test since the code is identical to Phase 1. name: Push to main @@ -20,8 +21,9 @@ permissions: id-token: write jobs: - # ── Shared gates (always run) ───────────────────────────── + # ── Phase 1 gates (skip on sentinel commit) ───────────────── Lint: + if: github.event.head_commit.message != 'Update package version' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -33,6 +35,7 @@ jobs: run: ruff check . Test: + if: github.event.head_commit.message != 'Update package version' runs-on: macos-latest strategy: fail-fast: false @@ -122,7 +125,6 @@ jobs: # ── Phase 2: Publish (only on sentinel commit) ──────────── Publish: runs-on: ubuntu-latest - needs: [Lint, Test] if: github.event.head_commit.message == 'Update package version' env: GH_TOKEN: ${{ github.token }} diff --git a/changelog.d/skip-phase2-lint-test.changed.md b/changelog.d/skip-phase2-lint-test.changed.md new file mode 100644 index 00000000..43d19571 --- /dev/null +++ b/changelog.d/skip-phase2-lint-test.changed.md @@ -0,0 +1 @@ +Skip redundant Lint and Test in Phase 2 of push workflow since code is identical to Phase 1