Skip to content

Commit 1b5e844

Browse files
committed
Skip wheel/sdist builds on PRs - only run unit tests
PR runs: 7 jobs (unit_tests only) Main/tag runs: 7 + 49 + 1 = 57 jobs (full build) Reduces PR CI from 57 to 7 jobs (88% reduction)
1 parent 5ecca59 commit 1b5e844

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/cibuildwheel.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ jobs:
5353
run: pytest tests -vv
5454

5555
build_wheels:
56+
# Skip wheel builds on PRs - only build on main branch and tags
57+
if: github.event_name != 'pull_request'
5658
name: Build wheels on ${{ matrix.os }}
5759
runs-on: ${{ matrix.os }}
5860
timeout-minutes: 90
@@ -342,6 +344,8 @@ jobs:
342344
overwrite: true
343345

344346
build_sdist:
347+
# Skip sdist builds on PRs - only build on main branch and tags
348+
if: github.event_name != 'pull_request'
345349
name: Build source distribution
346350
runs-on: ubuntu-latest
347351
steps:

0 commit comments

Comments
 (0)