Skip to content

Commit 4d2ee07

Browse files
committed
build: replace outdated *-latest runners with specific ones
This change unlocks the current pipelines because it will allow use of newer version of 3.9 which is required by tox. In general is better not to use `-latest` runners because they are very often outdated versions, causing problems. As github does not update the name of the runners very often, it is easier to use specific ones. This also prevents surprises when github is changing the runner versions as they do this gradually and -latest ones might point to different runners in different jobs. Related: tox-dev/tox#3565 Reference: https://github.com/actions/runner-images
1 parent cfc6606 commit 4d2ee07

File tree

4 files changed

+34
-24
lines changed

4 files changed

+34
-24
lines changed

.github/workflows/test.yml

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -95,55 +95,55 @@ jobs:
9595
# Use separate jobs for different unittest flavors (twisted, asynctest) to ensure proper coverage.
9696
- name: "windows-py39-unittest-asynctest"
9797
python: "3.9"
98-
os: windows-latest
98+
os: windows-2025
9999
tox_env: "py39-asynctest"
100100
use_coverage: true
101101

102102
- name: "windows-py39-unittest-twisted24"
103103
python: "3.9"
104-
os: windows-latest
104+
os: windows-2025
105105
tox_env: "py39-twisted24"
106106
use_coverage: true
107107

108108
- name: "windows-py39-unittest-twisted25"
109109
python: "3.9"
110-
os: windows-latest
110+
os: windows-2025
111111
tox_env: "py39-twisted25"
112112
use_coverage: true
113113

114114
- name: "windows-py39-pluggy"
115115
python: "3.9"
116-
os: windows-latest
116+
os: windows-2025
117117
tox_env: "py39-pluggymain-pylib-xdist"
118118

119119
- name: "windows-py39-xdist"
120120
python: "3.9"
121-
os: windows-latest
121+
os: windows-2025
122122
tox_env: "py39-xdist"
123123

124124
- name: "windows-py310"
125125
python: "3.10"
126-
os: windows-latest
126+
os: windows-2025
127127
tox_env: "py310-xdist"
128128

129129
- name: "windows-py311"
130130
python: "3.11"
131-
os: windows-latest
131+
os: windows-2025
132132
tox_env: "py311"
133133

134134
- name: "windows-py312"
135135
python: "3.12"
136-
os: windows-latest
136+
os: windows-2025
137137
tox_env: "py312"
138138

139139
- name: "windows-py313"
140140
python: "3.13"
141-
os: windows-latest
141+
os: windows-2025
142142
tox_env: "py313"
143143

144144
- name: "windows-py314"
145145
python: "3.14"
146-
os: windows-latest
146+
os: windows-2025
147147
tox_env: "py314"
148148

149149
# Use separate jobs for different unittest flavors (twisted, asynctest) to ensure proper coverage.
@@ -223,28 +223,28 @@ jobs:
223223

224224
- name: "macos-py39"
225225
python: "3.9"
226-
os: macos-latest
226+
os: macos-15
227227
tox_env: "py39-xdist"
228228
use_coverage: true
229229

230230
- name: "macos-py310"
231231
python: "3.10"
232-
os: macos-latest
232+
os: macos-15
233233
tox_env: "py310-xdist"
234234

235235
- name: "macos-py312"
236236
python: "3.12"
237-
os: macos-latest
237+
os: macos-15
238238
tox_env: "py312-xdist"
239239

240240
- name: "macos-py313"
241241
python: "3.13"
242-
os: macos-latest
242+
os: macos-15
243243
tox_env: "py313-xdist"
244244

245245
- name: "macos-py314"
246246
python: "3.14"
247-
os: macos-latest
247+
os: macos-15
248248
tox_env: "py314-xdist"
249249

250250
- name: "plugins"
@@ -291,17 +291,22 @@ jobs:
291291
name: Packages
292292
path: dist
293293

294-
- name: Set up Python ${{ matrix.python }}
295-
uses: actions/setup-python@v5
294+
# - name: Set up Python ${{ matrix.python }}
295+
# uses: actions/setup-python@v5
296+
# with:
297+
# python-version: ${{ matrix.python }}
298+
# check-latest: true
299+
# allow-prereleases: true
300+
301+
- name: Install the latest version of uv
302+
uses: astral-sh/setup-uv@v6
296303
with:
297304
python-version: ${{ matrix.python }}
298-
check-latest: true
299-
allow-prereleases: true
300305

301306
- name: Install dependencies
302307
run: |
303308
python -m pip install --upgrade pip
304-
pip install tox coverage
309+
pip install tox tox-uv coverage
305310
306311
- name: Test without coverage
307312
if: "! matrix.use_coverage"

.python-version

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
3.9.17
2+
3.10.13
3+
3.11.13
4+
3.12.11
5+
3.13.5

testing/plugins_integration/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
anyio[trio]==4.9.0
22
django==5.2.1
3+
pip>=24.0.0
34
pytest-asyncio==1.1.0
45
pytest-bdd==8.1.0
56
pytest-cov==6.2.1

tox.ini

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[tox]
22
isolated_build = True
3-
minversion = 3.20.0
3+
minversion = 4.28.1
4+
requires =
5+
tox-uv
46
distshare = {homedir}/.tox/distshare
57
envlist =
68
linting
@@ -159,10 +161,7 @@ setenv =
159161
description =
160162
run reverse dependency testing against pytest plugins under `{basepython}`
161163
# use latest versions of all plugins, including pre-releases
162-
pip_pre=true
163-
# use latest pip to get new dependency resolver (#7783)
164164
download=true
165-
install_command=python -m pip install {opts} {packages}
166165
changedir = testing/plugins_integration
167166
deps = -rtesting/plugins_integration/requirements.txt
168167
setenv =

0 commit comments

Comments
 (0)