Skip to content

Commit 9cecf63

Browse files
Mlaz-codeclaude
andcommitted
ci(publish): gate PyPI release on test matrix passing
Previously publish.yml fired directly on release:published with zero test dependency — a broken SDK could reach PyPI and only be recovered by publishing a new version (PyPI versions are immutable). Add a `test` job mirroring test.yml's Python 3.10-3.13 matrix, and make `publish` needs: test. Same coverage a push/PR gets is now required before bits hit PyPI. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent f7a2e9e commit 9cecf63

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,33 @@ on:
55
types: [published]
66

77
jobs:
8+
# Re-run the full test matrix on the tagged commit before publish.
9+
# Mirrors test.yml so a tagged release gets the same coverage as
10+
# a push/PR. Previously publish.yml ran zero tests — a broken SDK
11+
# could reach PyPI, and PyPI versions are immutable (only super-
12+
# ceded). needs: test below gates the publish job on every matrix
13+
# entry passing.
14+
test:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
python-version: ["3.10", "3.11", "3.12", "3.13"]
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- uses: actions/setup-python@v5
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Install dependencies
28+
run: pip install -e ".[test,pandas]"
29+
30+
- name: Run tests
31+
run: pytest -v
32+
833
publish:
34+
needs: test
935
runs-on: ubuntu-latest
1036
permissions:
1137
id-token: write

0 commit comments

Comments
 (0)