Skip to content

Commit 137fd63

Browse files
Add CI step to check Python packaging
1 parent 9604ff9 commit 137fd63

File tree

1 file changed

+41
-3
lines changed

1 file changed

+41
-3
lines changed

.github/workflows/tests.yml

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,44 @@ 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: Install GSL
29+
run: sudo apt-get update && sudo apt-get install -y libgsl-dev
30+
31+
- name: Set up Python 3.14
32+
uses: actions/setup-python@v6.1.0
33+
with:
34+
python-version: 3.14
35+
36+
- name: Install build deps
37+
run: |
38+
pip install uv
39+
uv pip install --system build twine validate-pyproject[all]
40+
41+
- name: Check package
42+
run: |
43+
validate-pyproject pyproject.toml
44+
python -m build
45+
python -m twine check --strict dist/*
46+
47+
- name: Install and run CLI
48+
run: |
49+
python -m pip install dist/*.whl
50+
msp --help
51+
1452
test:
1553
name: Python
1654
runs-on: ${{ matrix.os }}
@@ -48,7 +86,7 @@ jobs:
4886
- name: Install GSL (macOS)
4987
if: matrix.os == 'macos-latest'
5088
run: brew install gsl
51-
89+
5290
- name: Install GSL (Windows)
5391
if: matrix.os == 'windows-latest'
5492
run: |
@@ -64,9 +102,9 @@ jobs:
64102
- name: Install GSL (Ubuntu)
65103
if: matrix.os == 'ubuntu-24.04'
66104
run: sudo apt-get update && sudo apt-get install -y libgsl-dev
67-
105+
68106
- name: Install pip deps
69-
run: |
107+
run: |
70108
pip install uv
71109
uv pip install --system -r pyproject.toml --extra test
72110

0 commit comments

Comments
 (0)