77 strategy :
88 matrix :
99 os : [ ubuntu-latest, macos-latest ]
10- python-version : ['3.7 ', '3.8 ', '3.9 ', '3.10 ', '3.11 ', '3.12 ', '3.13 ', 'pypy3.10']
10+ python-version : ['3.9 ', '3.10 ', '3.11 ', '3.12 ', '3.13 ', '3.14 ', '3.14t ', 'pypy3.10', 'pypy3.11 ']
1111 tarantool : ['1.10', '2', '3']
1212 exclude :
1313 - os : macos-latest
1414 tarantool : ' 1.10'
1515 - os : macos-latest
1616 tarantool : ' 2'
17- - os : macos-latest
18- python-version : ' 3.7'
1917 - python-version : ' pypy3.10'
2018 tarantool : ' 1.10'
19+ - python-version : ' pypy3.11'
20+ tarantool : ' 1.10'
2121
2222 runs-on : ${{ matrix.os }}
2323
2424 steps :
2525 - uses : actions/checkout@v4
2626 with :
2727 submodules : recursive
28+
2829 - name : Set up Python ${{ matrix.python-version }}
2930 uses : actions/setup-python@v5
3031 with :
@@ -40,24 +41,41 @@ jobs:
4041 if : matrix.os == 'macos-latest'
4142 run : brew install tarantool
4243
44+ - name : Install uv
45+ uses : astral-sh/setup-uv@v4
46+
4347 - name : Install dependencies
44- run : |
45- python -m pip install --upgrade pip setuptools wheel coveralls
48+ run : uv sync --extra test
49+
50+ - name : Run ruff check
51+ run : uv run ruff check .
52+
53+ - name : Run ruff format check
54+ run : uv run ruff format --check .
55+
4656 - name : Run tests
47- run : |
48- if [[ "$RUNNER_OS" == "Linux" && ${{ matrix.python-version }} == "3.12" && ${{ matrix.tarantool }} == "3" ]]; then
49- make build && make test
50- make clean && make debug && make coverage
51- # coveralls
52- else
53- make build && make lint && make quicktest
54- fi
57+ run : uv run pytest .
58+
59+ - name : Run tests with uvloop
60+ if : " !contains(matrix.python-version, 'pypy')"
61+ env :
62+ USE_UVLOOP : " 1"
63+ run : uv run pytest .
64+
65+ - name : Run coverage tests
66+ if : matrix.os == 'ubuntu-latest' && matrix.python-version == '3.14' && matrix.tarantool == '3'
5567 env :
68+ ASYNCTNT_DEBUG : " 1"
5669 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}"
70+ run : |
71+ make clean
72+ uv pip install -e '.[test]'
73+ uv run pytest --cov
74+ ./scripts/run_until_success.sh uv run coverage report -m
75+ ./scripts/run_until_success.sh uv run coverage html
5776
5877 build-wheels :
5978 name : Build wheels on ${{ matrix.os }}
60- if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
6179 runs-on : ${{ matrix.os }}
6280 strategy :
6381 matrix :
@@ -71,75 +89,100 @@ jobs:
7189 submodules : recursive
7290
7391 - uses : actions/setup-python@v5
92+ with :
93+ python-version : ' 3.14'
94+
95+ - name : Install uv
96+ uses : astral-sh/setup-uv@v4
7497
7598 - name : Install cibuildwheel
76- run : python -m pip install --upgrade cibuildwheel
99+ run : uv tool install cibuildwheel
100+
101+ - name : Install pyproject-build
102+ run : uv tool install build
103+
104+ - name : Build source archive
105+ if : matrix.os == 'ubuntu-latest'
106+ run : |
107+ pyproject-build -s .
77108
78109 - name : Build wheels
79- run : python -m cibuildwheel --output-dir wheelhouse
110+ run : cibuildwheel --output-dir dist
80111 env :
81- CIBW_BUILD : " cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* cp313-* pp310-*"
112+ CIBW_ENABLE : pypy pypy-eol
113+ CIBW_BUILD : " cp39-* cp310-* cp311-* cp312-* cp313-* cp314-* cp314t-* pp310-* pp311-*"
82114
83115 - uses : actions/upload-artifact@v4
84116 with :
85117 name : wheels-${{ matrix.os }}
86- path : ./wheelhouse/*.whl
118+ path : ./dist/*
87119
88120 publish :
89121 name : Publish wheels
90122 if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
91123 needs :
92124 - build-wheels
93125 runs-on : ubuntu-latest
126+ environment :
127+ name : pypi
128+ url : https://pypi.org/p/asynctnt
129+ permissions :
130+ id-token : write # Required for trusted publishing
131+ contents : write # Required for releases
94132 steps :
95133 - name : Get tag
96134 id : get_tag
97135 run : echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\//}
136+
98137 - run : echo "Current tag is ${{ steps.get_tag.outputs.TAG }}"
138+
99139 - uses : actions/checkout@v4
100140 with :
101141 submodules : recursive
142+
102143 - name : Set up Python
103144 uses : actions/setup-python@v5
104145 with :
105- python-version : ' 3.12'
146+ python-version : ' 3.14'
147+
148+ - name : Install uv
149+ uses : astral-sh/setup-uv@v4
106150
107151 - name : Install dependencies
108152 run : |
109- python -m pip install --upgrade pip setuptools wheel twine build
153+ uv pip install --upgrade build
110154
111155 - uses : actions/download-artifact@v4
112156 with :
113157 name : wheels-ubuntu-latest
114- path : wheels-ubuntu
158+ path : dist
115159
116160 - uses : actions/download-artifact@v4
117161 with :
118162 name : wheels-macos-latest
119- path : wheels-macos
163+ path : dist
120164
121165 - uses : actions/download-artifact@v4
122166 with :
123167 name : wheels-windows-latest
124- path : wheels-windows
168+ path : dist
125169
126- - name : Publish dist
170+ - name : Build source archive
127171 run : |
128172 python -m build . -s
129- tree dist wheels-ubuntu wheels-macos wheels-windows
130- twine upload dist/* wheels-ubuntu/*.whl wheels-macos/*.whl wheels-windows/*.whl
131- env :
132- TWINE_USERNAME : ${{ secrets.TWINE_USERNAME }}
133- TWINE_PASSWORD : ${{ secrets.TWINE_PASSWORD }}
173+ tree dist
174+
175+ - name : Publish to PyPI
176+ uses : pypa/gh-action-pypi-publish@release/v1
177+ with :
178+ print-hash : true
179+
134180 - uses : marvinpinto/action-automatic-releases@latest
135181 with :
136182 repo_token : " ${{ secrets.GITHUB_TOKEN }}"
137183 prerelease : false
138184 title : ${{ steps.get_tag.outputs.TAG }}
139185 files : |
140- wheels-ubuntu/*.whl
141- wheels-macos/*.whl
142- wheels-windows/*.whl
143186 dist/*
144187
145188 docs :
@@ -156,12 +199,10 @@ jobs:
156199 - name : Set up Python
157200 uses : actions/setup-python@v5
158201 with :
159- python-version : ' 3.12 '
202+ python-version : ' 3.14 '
160203
161- - name : Install dependencies
162- run : |
163- python -m pip install --upgrade pip setuptools wheel build
164- make build
204+ - name : Install uv
205+ uses : astral-sh/setup-uv@v4
165206
166207 - name : Build docs
167208 run : make docs
0 commit comments