Skip to content

Commit 62738d5

Browse files
committed
Add extra test gate between package build and publish
1 parent a698e2c commit 62738d5

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ jobs:
3434

3535
- uses: hynek/build-and-inspect-python-package@fe0a0fb1925ca263d076ca4f2c13e93a6e92a33e # v2.17.0
3636

37+
test-package:
38+
name: Test package
39+
needs: build-package
40+
uses: ./.github/workflows/tests.yml
41+
3742
# Publish to Test PyPI for every tag.
3843
release-test-pypi:
3944
name: Publish in-dev package to test.pypi.org
@@ -42,7 +47,7 @@ jobs:
4247
&& github.event_name == 'push'
4348
&& startsWith(github.ref, 'refs/tags/')
4449
runs-on: ubuntu-latest
45-
needs: build-package
50+
needs: test-package
4651

4752
permissions:
4853
id-token: write
@@ -66,7 +71,7 @@ jobs:
6671
github.repository_owner == 'python'
6772
&& github.event.action == 'published'
6873
runs-on: ubuntu-latest
69-
needs: build-package
74+
needs: test-package
7075

7176
environment:
7277
name: release

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- master
77
pull_request:
8+
workflow_call:
89
workflow_dispatch:
910

1011
permissions: {}

0 commit comments

Comments
 (0)