Skip to content

Commit f93e21b

Browse files
committed
test build matrix
1 parent 7e15188 commit f93e21b

1 file changed

Lines changed: 41 additions & 29 deletions

File tree

.github/workflows/unit_tests.yml

Lines changed: 41 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
print(f"python-versions={json.dumps(versions)}")
5252
EOF
5353
54-
test:
54+
test-and-build:
5555
needs: generate-matrix
5656
runs-on: ${{ matrix.os }}
5757
strategy:
@@ -99,40 +99,52 @@ jobs:
9999
name: "${{ matrix.os }} - Python ${{ matrix.python-version }}"
100100
token: ${{ secrets.CODECOV_TOKEN }}
101101

102+
- name: Build binaries for ${{ matrix.os }}-${{ matrix.python-version }}
103+
run: |
104+
uv build
105+
106+
- name: Upload builds
107+
uses: actions/upload-artifact@v7
108+
with:
109+
name: dist
110+
path: dist/
111+
102112

103113
testpypi-deploy:
104114
name: Build and publish Python 🐍 distributions 📦 to TestPyPI
115+
environment: testpypi
116+
permissions:
117+
id-token: write
105118
runs-on: ubuntu-latest
106-
needs: test
119+
needs: test-and-build
107120
steps:
108121

109-
- name: Checkout repository
110-
uses: actions/checkout@v7
111-
112-
- name: Install uv
113-
uses: astral-sh/setup-uv@v7
114-
with:
115-
cache-dependency-glob: "uv.lock"
116-
enable-cache: true
117-
118-
- name: Install Python
119-
uses: actions/setup-python@v7
122+
- name: Download Artifacts
123+
uses: actions/download-artifact@v8
120124
with:
121-
python-version-file: "pyproject.toml"
125+
name: dist
126+
path: dist/
122127

123-
- name: Build test release 📦
124-
uses: messense/maturin-action@v1
125-
with:
126-
manylinux: auto
127-
command: build
128-
args: --release --sdist -o dist --find-interpreter
129-
130-
- name: Publish test release 📦 to Test PyPI
131-
uses: messense/maturin-action@v1
132-
continue-on-error: true
133-
env:
134-
MATURIN_PYPI_TOKEN: ${{ secrets.TEST_PYPI_PASSWORD }}
135-
MATURIN_REPOSITORY_URL: "https://test.pypi.org/legacy"
128+
- name: Publish to Test PyPI
129+
uses: pypa/gh-action-pypi-publish@release/v1
136130
with:
137-
command: upload
138-
args: --skip-existing *
131+
print-hash: true
132+
repository-url: https://test.pypi.org/legacy/
133+
skip-existing: true
134+
135+
# - name: Build test release 📦
136+
# uses: messense/maturin-action@v1
137+
# with:
138+
# manylinux: auto
139+
# command: build
140+
# args: --release --sdist -o dist --find-interpreter
141+
142+
# - name: Publish test release 📦 to Test PyPI
143+
# uses: messense/maturin-action@v1
144+
# continue-on-error: true
145+
# env:
146+
# MATURIN_PYPI_TOKEN: ${{ secrets.TEST_PYPI_PASSWORD }}
147+
# MATURIN_REPOSITORY_URL: "https://test.pypi.org/legacy"
148+
# with:
149+
# command: upload
150+
# args: --skip-existing *

0 commit comments

Comments
 (0)