66 test :
77 strategy :
88 matrix :
9- os : [ ubuntu-latest, macos-latest ]
9+ os : [ ubuntu-latest, macos-latest, windows-latest ]
1010 python-version : ['3.10', '3.11', '3.12']
1111
1212 runs-on : ${{ matrix.os }}
@@ -28,63 +28,25 @@ jobs:
2828 run : uv sync --all-extras --dev
2929
3030 - name : Run style check
31- run : uv run ruff format --check --diff $(package)
31+ run : uv run ruff format --check --diff extapi tests
3232
3333 - name : Run ruff
34- run : uv run ruff check $(package)
34+ run : uv run ruff check extapi tests
3535
3636 - name : Run mypy
37- run : uv run mypy --enable-error-code ignore-without-code $(package)
37+ run : uv run mypy --enable-error-code ignore-without-code extapi tests
3838
3939 - name : Run deptry
4040 run : uv run deptry . -e 'env|\.env|venv|\.venv|\..+'
4141
4242 - name : Run tests
4343 run : uv run pytest .
4444
45- build-wheels :
46- name : Build wheels on ${{ matrix.os }}
47- if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
48- runs-on : ${{ matrix.os }}
49- strategy :
50- matrix :
51- os : [ ubuntu-latest, windows-latest, macos-latest ]
52- needs :
53- - test
54-
55- steps :
56- - uses : actions/checkout@v4
57- with :
58- submodules : recursive
59-
60- - name : Install uv
61- uses : astral-sh/setup-uv@v3
62-
63- - uses : actions/setup-python@v5
64-
65- - name : Install the project
66- run : uv sync --all-extras --dev
67- env :
68- UV_SYSTEM_PYTHON : 1
69-
70- - name : Install cibuildwheel
71- run : pip install --upgrade cibuildwheel
72-
73- - name : Build wheels
74- run : python -m cibuildwheel --output-dir wheelhouse
75- env :
76- CIBW_BUILD : " cp310-* cp311-* cp312-*"
77-
78- - uses : actions/upload-artifact@v4
79- with :
80- name : wheels-${{ matrix.os }}
81- path : ./wheelhouse/*.whl
82-
8345 publish :
84- name : Publish wheels
46+ name : Publish to PyPI
8547 if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
8648 needs :
87- - build-wheels
49+ - test
8850 runs-on : ubuntu-latest
8951 steps :
9052 - name : Get tag
@@ -106,26 +68,11 @@ jobs:
10668 run : |
10769 python -m pip install --upgrade pip setuptools wheel twine build
10870
109- - uses : actions/download-artifact@v4
110- with :
111- name : wheels-ubuntu-latest
112- path : wheels-ubuntu
113-
114- - uses : actions/download-artifact@v4
115- with :
116- name : wheels-macos-latest
117- path : wheels-macos
118-
119- - uses : actions/download-artifact@v4
120- with :
121- name : wheels-windows-latest
122- path : wheels-windows
123-
12471 - name : Publish dist
12572 run : |
12673 python -m build . -s
127- tree dist wheels-ubuntu wheels-macos wheels-windows
128- twine upload dist/* wheels-ubuntu/*.whl wheels-macos/*.whl wheels-windows/*.whl
74+ tree dist
75+ twine upload dist/*
12976 env :
13077 TWINE_USERNAME : ${{ secrets.TWINE_USERNAME }}
13178 TWINE_PASSWORD : ${{ secrets.TWINE_PASSWORD }}
13683 prerelease : false
13784 title : ${{ steps.get_tag.outputs.TAG }}
13885 files : |
139- wheels-ubuntu/*.whl
140- wheels-macos/*.whl
141- wheels-windows/*.whl
14286 dist/*
0 commit comments