Skip to content

Commit 548e68f

Browse files
only run tests when releasing
1 parent 9fcced8 commit 548e68f

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,9 @@ permissions:
2424
contents: read
2525

2626
jobs:
27-
test:
28-
uses: ./.github/workflows/test.yml
29-
with:
30-
os: "macos-latest,ubuntu-latest,windows-latest"
31-
secrets: inherit
3227

3328
linux:
3429
runs-on: ${{ matrix.platform.runner }}
35-
needs: test
3630
strategy:
3731
matrix:
3832
platform:
@@ -68,7 +62,6 @@ jobs:
6862

6963
musllinux:
7064
runs-on: ${{ matrix.platform.runner }}
71-
needs: test
7265
strategy:
7366
matrix:
7467
platform:
@@ -100,7 +93,6 @@ jobs:
10093

10194
windows:
10295
runs-on: ${{ matrix.platform.runner }}
103-
needs: test
10496
strategy:
10597
matrix:
10698
platform:
@@ -128,7 +120,6 @@ jobs:
128120

129121
macos:
130122
runs-on: ${{ matrix.platform.runner }}
131-
needs: test
132123
strategy:
133124
matrix:
134125
platform:
@@ -155,7 +146,6 @@ jobs:
155146

156147
sdist:
157148
runs-on: ubuntu-latest
158-
needs: test
159149
steps:
160150
- uses: actions/checkout@v4
161151
- name: Build sdist
@@ -169,10 +159,17 @@ jobs:
169159
name: wheels-sdist
170160
path: dist
171161

162+
test:
163+
uses: ./.github/workflows/test.yml
164+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
165+
with:
166+
os: "macos-latest,ubuntu-latest,windows-latest"
167+
secrets: inherit
168+
172169
release:
173170
runs-on: ubuntu-latest
174171
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
175-
needs: [linux, musllinux, windows, macos, sdist]
172+
needs: [linux, musllinux, windows, macos, sdist, test]
176173
environment: release
177174
permissions:
178175
# Use to sign the release artifacts

0 commit comments

Comments
 (0)