Skip to content

Commit 5266395

Browse files
authored
Merge pull request #262 from PolicyEngine/fix/skip-phase2-lint-test
perf: Skip redundant Lint and Test in Phase 2
2 parents a47244d + cbfb4b2 commit 5266395

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/push.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
# Versioning commits with message "Update package version".
55
# The commit pushes to main, re-triggering this workflow for Phase 2.
66
#
7-
# Phase 2 (sentinel commit): Lint + Test → Publish to PyPI + GitHub Release
7+
# Phase 2 (sentinel commit): Publish to PyPI + GitHub Release
8+
# Skips Lint + Test since the code is identical to Phase 1.
89

910
name: Push to main
1011

@@ -20,8 +21,9 @@ permissions:
2021
id-token: write
2122

2223
jobs:
23-
# ── Shared gates (always run) ─────────────────────────────
24+
# ── Phase 1 gates (skip on sentinel commit) ─────────────────
2425
Lint:
26+
if: github.event.head_commit.message != 'Update package version'
2527
runs-on: ubuntu-latest
2628
steps:
2729
- uses: actions/checkout@v4
@@ -33,6 +35,7 @@ jobs:
3335
run: ruff check .
3436

3537
Test:
38+
if: github.event.head_commit.message != 'Update package version'
3639
runs-on: macos-latest
3740
strategy:
3841
fail-fast: false
@@ -122,7 +125,6 @@ jobs:
122125
# ── Phase 2: Publish (only on sentinel commit) ────────────
123126
Publish:
124127
runs-on: ubuntu-latest
125-
needs: [Lint, Test]
126128
if: github.event.head_commit.message == 'Update package version'
127129
env:
128130
GH_TOKEN: ${{ github.token }}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Skip redundant Lint and Test in Phase 2 of push workflow since code is identical to Phase 1

0 commit comments

Comments
 (0)