26
26
runs-on : ubuntu-latest
27
27
28
28
steps :
29
- - uses : actions/checkout@v2
30
- - uses : actions/setup-python@v2
29
+ - uses : actions/checkout@v4
30
+ - uses : actions/setup-python@v5
31
+ with :
32
+ python-version : " 3.x"
31
33
- run : pip install nox
32
34
- run : nox -s docs
33
35
@@ -55,24 +57,15 @@ jobs:
55
57
- "noxfile.py"
56
58
if : github.event_name == 'pull_request'
57
59
58
- pre-commit :
59
- name : pre-commit
60
- runs-on : ubuntu-latest
61
-
62
- steps :
63
- - uses : actions/checkout@v2
64
- - uses : actions/setup-python@v2
65
- -
uses :
pre-commit/[email protected]
66
- with :
67
- extra_args : --all-files --hook-stage=manual
68
-
69
60
packaging :
70
61
name : packaging
71
62
runs-on : ubuntu-latest
72
63
73
64
steps :
74
- - uses : actions/checkout@v2
75
- - uses : actions/setup-python@v2
65
+ - uses : actions/checkout@v4
66
+ - uses : actions/setup-python@v5
67
+ with :
68
+ python-version : " 3.x"
76
69
- name : Set up git credentials
77
70
run : |
78
71
git config --global user.email "[email protected] "
81
74
- run : pip install nox
82
75
- run : nox -s prepare-release -- 99.9
83
76
- run : nox -s build-release -- 99.9
77
+ - run : pipx run check-manifest
84
78
85
79
vendoring :
86
80
name : vendoring
@@ -92,18 +86,20 @@ jobs:
92
86
github.event_name != 'pull_request'
93
87
94
88
steps :
95
- - uses : actions/checkout@v2
96
- - uses : actions/setup-python@v2
89
+ - uses : actions/checkout@v4
90
+ - uses : actions/setup-python@v5
91
+ with :
92
+ python-version : " 3.x"
97
93
98
94
- run : pip install nox
99
95
- run : nox -s vendoring
100
96
- run : git diff --exit-code
101
97
102
98
tests-unix :
103
- name : tests / ${{ matrix.python }} / ${{ matrix.os }}
99
+ name : tests / ${{ matrix.python.key || matrix.python }} / ${{ matrix.os }}
104
100
runs-on : ${{ matrix.os }}-latest
105
101
106
- needs : [pre-commit, packaging, determine-changes]
102
+ needs : [packaging, determine-changes]
107
103
if : >-
108
104
needs.determine-changes.outputs.tests == 'true' ||
109
105
github.event_name != 'pull_request'
@@ -113,36 +109,40 @@ jobs:
113
109
matrix :
114
110
os : [Ubuntu, MacOS]
115
111
python :
116
- - 3.7
117
- - 3.8
118
- - 3.9
112
+ - " 3.8"
113
+ - " 3.9"
119
114
- " 3.10"
115
+ - " 3.11"
116
+ - " 3.12"
120
117
121
118
steps :
122
- - uses : actions/checkout@v2
123
- - uses : actions/setup-python@v2
119
+ - uses : actions/checkout@v4
120
+ - uses : actions/setup-python@v5
124
121
with :
125
122
python-version : ${{ matrix.python }}
123
+ allow-prereleases : true
126
124
127
125
- name : Install Ubuntu dependencies
128
126
if : matrix.os == 'Ubuntu'
129
- run : sudo apt-get install bzr
127
+ run : |
128
+ sudo apt-get update
129
+ sudo apt-get install bzr
130
130
131
131
- name : Install MacOS dependencies
132
132
if : matrix.os == 'MacOS'
133
- run : brew install bzr
133
+ run : brew install breezy
134
134
135
- - run : pip install nox 'virtualenv<20' 'setuptools != 60.6.0'
135
+ - run : pip install nox
136
136
137
137
# Main check
138
138
- name : Run unit tests
139
139
run : >-
140
- nox -s test-${{ matrix.python }} --
140
+ nox -s test-${{ matrix.python.key || matrix.python }} --
141
141
-m unit
142
142
--verbose --numprocesses auto --showlocals
143
143
- name : Run integration tests
144
144
run : >-
145
- nox -s test-${{ matrix.python }} --
145
+ nox -s test-${{ matrix.python.key || matrix.python }} --
146
146
-m integration
147
147
--verbose --numprocesses auto --showlocals
148
148
--durations=5
@@ -151,7 +151,7 @@ jobs:
151
151
name : tests / ${{ matrix.python }} / ${{ matrix.os }} / ${{ matrix.group }}
152
152
runs-on : ${{ matrix.os }}-latest
153
153
154
- needs : [pre-commit, packaging, determine-changes]
154
+ needs : [packaging, determine-changes]
155
155
if : >-
156
156
needs.determine-changes.outputs.tests == 'true' ||
157
157
github.event_name != 'pull_request'
@@ -161,37 +161,28 @@ jobs:
161
161
matrix :
162
162
os : [Windows]
163
163
python :
164
- - 3.7
165
- # Commented out, since Windows tests are expensively slow.
166
- # - 3.8
167
- # - 3.9
168
- - " 3.10"
164
+ - " 3.8"
165
+ # Commented out, since Windows tests are expensively slow,
166
+ # only test the oldest and newest Python supported by pip
167
+ # - "3.9"
168
+ # - "3.10"
169
+ # - "3.11"
170
+ - " 3.12"
169
171
group : [1, 2]
170
172
171
173
steps :
172
- - uses : actions/checkout@v2
173
- - uses : actions/setup-python@v2
174
+ - uses : actions/checkout@v4
175
+ - uses : actions/setup-python@v5
174
176
with :
175
177
python-version : ${{ matrix.python }}
176
178
177
- # We use a RAMDisk on Windows, since filesystem IO is a big slowdown
178
- # for our tests.
179
- - name : Create a RAMDisk
180
- run : ./tools/ci/New-RAMDisk.ps1 -Drive R -Size 1GB
181
-
182
- - name : Setup RAMDisk permissions
183
- run : |
184
- mkdir R:\Temp
185
- $acl = Get-Acl "R:\Temp"
186
- $rule = New-Object System.Security.AccessControl.FileSystemAccessRule(
187
- "Everyone", "FullControl", "ContainerInherit,ObjectInherit", "None", "Allow"
188
- )
189
- $acl.AddAccessRule($rule)
190
- Set-Acl "R:\Temp" $acl
191
-
192
- - run : pip install nox 'virtualenv<20'
179
+ # We use C:\Temp (which is already available on the worker)
180
+ # as a temporary directory for all of the tests because the
181
+ # default value (under the user dir) is more deeply nested
182
+ # and causes tests to fail with "path too long" errors.
183
+ - run : pip install nox
193
184
env :
194
- TEMP : " R :\\ Temp"
185
+ TEMP : " C :\\ Temp"
195
186
196
187
# Main check
197
188
- name : Run unit tests
@@ -201,7 +192,7 @@ jobs:
201
192
-m unit
202
193
--verbose --numprocesses auto --showlocals
203
194
env :
204
- TEMP : " R :\\ Temp"
195
+ TEMP : " C :\\ Temp"
205
196
206
197
- name : Run integration tests (group 1)
207
198
if : matrix.group == 1
@@ -210,7 +201,7 @@ jobs:
210
201
-m integration -k "not test_install"
211
202
--verbose --numprocesses auto --showlocals
212
203
env :
213
- TEMP : " R :\\ Temp"
204
+ TEMP : " C :\\ Temp"
214
205
215
206
- name : Run integration tests (group 2)
216
207
if : matrix.group == 2
@@ -219,27 +210,29 @@ jobs:
219
210
-m integration -k "test_install"
220
211
--verbose --numprocesses auto --showlocals
221
212
env :
222
- TEMP : " R :\\ Temp"
213
+ TEMP : " C :\\ Temp"
223
214
224
215
tests-zipapp :
225
216
name : tests / zipapp
226
217
runs-on : ubuntu-latest
227
218
228
- needs : [pre-commit, packaging, determine-changes]
219
+ needs : [packaging, determine-changes]
229
220
if : >-
230
221
needs.determine-changes.outputs.tests == 'true' ||
231
222
github.event_name != 'pull_request'
232
223
233
224
steps :
234
- - uses : actions/checkout@v2
235
- - uses : actions/setup-python@v2
225
+ - uses : actions/checkout@v4
226
+ - uses : actions/setup-python@v5
236
227
with :
237
228
python-version : " 3.10"
238
229
239
230
- name : Install Ubuntu dependencies
240
- run : sudo apt-get install bzr
231
+ run : |
232
+ sudo apt-get update
233
+ sudo apt-get install bzr
241
234
242
- - run : pip install nox 'virtualenv<20' 'setuptools != 60.6.0'
235
+ - run : pip install nox
243
236
244
237
# Main check
245
238
- name : Run integration tests
@@ -250,53 +243,16 @@ jobs:
250
243
--durations=5
251
244
--use-zipapp
252
245
253
- # TODO: Remove this when we add Python 3.11 to CI.
254
- tests-importlib-metadata :
255
- name : tests for importlib.metadata backend
256
- runs-on : ubuntu-latest
257
- env :
258
- _PIP_USE_IMPORTLIB_METADATA : ' true'
259
-
260
- needs : [pre-commit, packaging, determine-changes]
261
- if : >-
262
- needs.determine-changes.outputs.tests == 'true' ||
263
- github.event_name != 'pull_request'
264
-
265
- steps :
266
- - uses : actions/checkout@v2
267
- - uses : actions/setup-python@v2
268
- with :
269
- python-version : ' 3.10'
270
-
271
- - name : Install Ubuntu dependencies
272
- run : sudo apt-get install bzr
273
-
274
- - run : pip install nox 'virtualenv<20'
275
-
276
- - name : Run unit tests
277
- run : >-
278
- nox -s test-3.10 --
279
- -m unit
280
- --verbose --numprocesses auto --showlocals
281
- - name : Run integration tests
282
- run : >-
283
- nox -s test-3.10 --
284
- -m integration
285
- --verbose --numprocesses auto --showlocals
286
- --durations=5
287
-
288
246
check : # This job does nothing and is only used for the branch protection
289
247
if : always()
290
248
291
249
needs :
292
250
- determine-changes
293
251
- docs
294
252
- packaging
295
- - pre-commit
296
253
- tests-unix
297
254
- tests-windows
298
255
- tests-zipapp
299
- - tests-importlib-metadata
300
256
- vendoring
301
257
302
258
runs-on : ubuntu-latest
0 commit comments