Skip to content

Commit e7bd2d1

Browse files
committed
Adding testing to CI
1 parent 827024b commit e7bd2d1

File tree

2 files changed

+46
-4
lines changed

2 files changed

+46
-4
lines changed

.github/workflows/publish-to-pypi.yaml

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
if: startsWith(github.ref, 'refs/tags')
99
strategy:
1010
matrix:
11-
os: [ubuntu-latest, ubuntu-20.04, macos-13, macos-14, windows-latest, macos-latest]
11+
os: [ubuntu-latest, ubuntu-24.04, macos-13, macos-14, windows-latest, macos-latest]
1212

1313
steps:
1414
- uses: actions/checkout@v4
@@ -43,8 +43,50 @@ jobs:
4343
name: artifact-sdist
4444
path: dist/*.tar.gz
4545

46+
test-wheels:
47+
name: Test wheels on ${{ matrix.os }}
48+
needs: [build_wheels]
49+
runs-on: ${{ matrix.os }}
50+
if: startsWith(github.ref, 'refs/tags')
51+
strategy:
52+
matrix:
53+
python-version: ["3.10", "3.12"]
54+
os: [ubuntu-latest, ubuntu-24.04, macos-13, macos-14, windows-latest, macos-latest]
55+
56+
steps:
57+
- uses: actions/checkout@v4
58+
with:
59+
submodules: recursive
60+
61+
- name: Set up Python ${{ matrix.python-version }}
62+
uses: actions/setup-python@v5
63+
with:
64+
python-version: ${{ matrix.python-version }}
65+
66+
- name: Download Python wheels
67+
uses: actions/download-artifact@v4
68+
with:
69+
pattern: artifact-cibw-wheels-${{ matrix.os }}-*
70+
merge-multiple: true
71+
path: ./wheels
72+
73+
- name: Setup UV
74+
uses: astral-sh/setup-uv@v5
75+
with:
76+
version: "latest"
77+
78+
- name: Install wheel
79+
shell: bash
80+
run: |
81+
uv pip install texterrors --find-links ./wheels/
82+
83+
- name: Run tests
84+
shell: bash
85+
run: |
86+
pytest -v .
87+
4688
upload_pypi:
47-
needs: [build_wheels, build_sdist]
89+
needs: [build_wheels, build_sdist, test-wheels]
4890
runs-on: ubuntu-latest
4991
if: startsWith(github.ref, 'refs/tags')
5092
steps:
@@ -57,4 +99,4 @@ jobs:
5799
- uses: pypa/[email protected]
58100
with:
59101
user: __token__
60-
password: ${{ secrets.PYPI_API_TOKEN }}
102+
password: ${{ secrets.PYPI_API_TOKEN }}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import setuptools
55
import sys
66

7-
__version__ = "1.0.8"
7+
__version__ = "1.0.9"
88

99

1010
class get_pybind_include(object):

0 commit comments

Comments
 (0)