99 pull_request :
1010 branches :
1111 - " *"
12+ release :
13+ types :
14+ - published
1215 schedule :
1316 # Daily at 05:47
1417 - cron : ' 47 5 * * *'
2124 PIP_NO_PYTHON_VERSION_WARNING : 1
2225
2326jobs :
27+ build :
28+ name : Build
29+ runs-on : ubuntu-latest
30+ container : docker://python:3.11-buster
31+ steps :
32+ - uses : actions/checkout@v4
33+ - name : Build
34+ run : |
35+ python -m venv venv
36+ venv/bin/pip install --upgrade pip
37+ venv/bin/pip install build
38+ venv/bin/python -m build --outdir dist/
39+ - uses : actions/upload-artifact@v4
40+ if : always()
41+ with :
42+ name : dist
43+ path : dist/*
44+ if-no-files-found : error
45+
2446 test :
2547 name : ${{ matrix.os.name }} ${{ matrix.python.name }} ${{ matrix.reactor.name }}
48+ needs : build
2649 runs-on : ${{ matrix.os.runs-on }}
2750 container : ${{ matrix.os.container[matrix.python.docker] }}
2851 strategy :
@@ -35,16 +58,18 @@ jobs:
3558 container :
3659 " 2.7 " : docker://python:2.7-buster
3760 " 3.5 " : docker://python:3.5-buster
38- " 3.6 " : docker://python:3.6-buster
39- " 3.7 " : docker://python:3.7-buster
40- " 3.8 " : docker://python:3.8-buster
41- " 3.9 " : docker://python:3.9-buster
42- " 3.10 " : docker://python:3.10-buster
43- " 3.11 " : docker://python:3.11-buster
44- " pypy2.7 " : docker://pypy:2.7-buster
45- " pypy3.7 " : docker://pypy:3.7-buster
46- " pypy3.8 " : docker://pypy:3.8-buster
47- " pypy3.9 " : docker://pypy:3.9-buster
61+ " 3.6 " : docker://python:3.6-bullseye
62+ " 3.7 " : docker://python:3.7-bookworm
63+ " 3.8 " : docker://python:3.8-bookworm
64+ " 3.9 " : docker://python:3.9-bookworm
65+ " 3.10 " : docker://python:3.10-bookworm
66+ " 3.11 " : docker://python:3.11-bookworm
67+ " 3.12 " : docker://python:3.12-bookworm
68+ " pypy2.7 " : docker://pypy:2.7-bookworm
69+ " pypy3.7 " : docker://pypy:3.7-bullseye
70+ " pypy3.8 " : docker://pypy:3.8-bookworm
71+ " pypy3.9 " : docker://pypy:3.9-bookworm
72+ " pypy3.10 " : docker://pypy:3.10-bookworm
4873 - name : 🪟
4974 runs-on : windows-latest
5075 python_platform : win32
@@ -100,6 +125,12 @@ jobs:
100125 docker : " 3.11"
101126 implementation : cpython
102127 major : 3
128+ - name : CPython 3.12
129+ tox : py312
130+ action : " 3.12"
131+ docker : " 3.12"
132+ implementation : cpython
133+ major : 3
103134# disabled due to installation failures
104135# https://github.com/pytest-dev/pytest-twisted/pull/157
105136# - name: PyPy 2.7
@@ -126,6 +157,12 @@ jobs:
126157 docker : pypy3.9
127158 implementation : pypy
128159 major : 3
160+ - name : PyPy 3.10
161+ tox : pypy310
162+ action : pypy-3.10
163+ docker : pypy3.10
164+ implementation : pypy
165+ major : 3
129166 reactor :
130167 - name : default
131168 tox : default
@@ -160,6 +197,10 @@ jobs:
160197 action : " 3.11"
161198 reactor :
162199 tox : pyside2
200+ - python :
201+ action : " 3.12"
202+ reactor :
203+ tox : pyside2
163204 - python :
164205 major : 2
165206 reactor :
@@ -173,13 +214,13 @@ jobs:
173214 reactor :
174215 tox : pyside2
175216 steps :
176- - uses : actions/checkout@v2
217+ - uses : actions/checkout@v4
177218 - name : Enable Problem Matchers
178219 run : |
179220 echo "::add-matcher::.github/local-problem-matchers.json"
180221 - name : Set up ${{ matrix.python.name }}
181222 if : ${{ job.container == '' }}
182- uses : actions/setup-python@v2
223+ uses : actions/setup-python@v5
183224 with :
184225 # This allows the matrix to specify just the major.minor version while still
185226 # expanding it to get the latest patch version including alpha releases.
@@ -215,21 +256,27 @@ jobs:
215256 - name : Install
216257 run : |
217258 pip install tox
259+ - uses : actions/download-artifact@v4
260+ with :
261+ name : dist
262+ path : dist/
218263 - name : Test
264+ shell : bash
219265 run : |
220- tox -v -e "${{ matrix.python.tox }}-${{ matrix.reactor.tox }}reactor"
266+ tox --installpkg dist/*.whl -v -e "${{ matrix.python.tox }}-${{ matrix.reactor.tox }}reactor"
267+
221268 linting :
222269 name : Linting
223270 runs-on : ubuntu-latest
224271 strategy :
225272 matrix :
226273 python :
227- - short : 39
228- dotted : 3.9
274+ - short : 311
275+ dotted : " 3.11 "
229276 steps :
230- - uses : actions/checkout@v2
277+ - uses : actions/checkout@v4
231278 - name : Set up Python ${{ matrix.python.dotted }}
232- uses : actions/setup-python@v2
279+ uses : actions/setup-python@v5
233280 with :
234281 python-version : ${{ matrix.python.dotted }}
235282 architecture : x64
@@ -239,12 +286,33 @@ jobs:
239286 - name : Test
240287 run : |
241288 tox -v -e linting
289+
290+ publish :
291+ name : Publish
292+ runs-on : ubuntu-latest
293+ needs :
294+ - build
295+ - test
296+ - linting
297+ steps :
298+ - uses : actions/download-artifact@v4
299+ with :
300+ name : dist
301+ path : dist/
302+ - uses : pypa/gh-action-pypi-publish@release/v1
303+ if : github.event_name == 'release'
304+ with :
305+ packages-dir : dist/
306+ skip-existing : true
307+
242308 all :
243309 name : All
244310 runs-on : ubuntu-latest
245311 needs :
312+ - build
246313 - test
247314 - linting
315+ - publish
248316 steps :
249317 - name : This
250318 shell : python
0 commit comments