Skip to content

Commit 18a2916

Browse files
Add CI step to check Python packaging
1 parent 9604ff9 commit 18a2916

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed

.github/workflows/tests.yml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,36 @@ jobs:
1111
name: Lint
1212
uses: tskit-dev/.github/.github/workflows/lint.yml@v2
1313

14+
packaging:
15+
name: Packaging
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Cancel Previous Runs
19+
uses: styfle/cancel-workflow-action@0.13.0
20+
with:
21+
access_token: ${{ github.token }}
22+
23+
- name: Checkout
24+
uses: actions/checkout@v6.0.2
25+
with:
26+
submodules: true
27+
28+
- name: Set up Python 3.14
29+
uses: actions/setup-python@v6.1.0
30+
with:
31+
python-version: 3.14
32+
33+
- name: Install build deps
34+
run: |
35+
pip install uv
36+
uv pip install --system twine validate-pyproject[all]
37+
38+
- name: Check package
39+
run: |
40+
validate-pyproject pyproject.toml
41+
python -m build
42+
python -m twine check --strict dist/*
43+
1444
test:
1545
name: Python
1646
runs-on: ${{ matrix.os }}
@@ -48,7 +78,7 @@ jobs:
4878
- name: Install GSL (macOS)
4979
if: matrix.os == 'macos-latest'
5080
run: brew install gsl
51-
81+
5282
- name: Install GSL (Windows)
5383
if: matrix.os == 'windows-latest'
5484
run: |
@@ -64,9 +94,9 @@ jobs:
6494
- name: Install GSL (Ubuntu)
6595
if: matrix.os == 'ubuntu-24.04'
6696
run: sudo apt-get update && sudo apt-get install -y libgsl-dev
67-
97+
6898
- name: Install pip deps
69-
run: |
99+
run: |
70100
pip install uv
71101
uv pip install --system -r pyproject.toml --extra test
72102

0 commit comments

Comments
 (0)