11
11
schedule :
12
12
- cron : 0 0 * * MON # Run every Monday at 00:00 UTC
13
13
14
+ concurrency :
15
+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
16
+ cancel-in-progress : true
17
+
14
18
jobs :
15
19
docs :
16
20
name : docs
17
21
runs-on : ubuntu-latest
18
22
19
23
steps :
20
- - uses : actions/checkout@v2
21
- - uses : actions/setup-python@v2
24
+ - uses : actions/checkout@v3
25
+ - uses : actions/setup-python@v4
26
+ with :
27
+ python-version : " 3.x"
22
28
- run : pip install nox
23
29
- run : nox -s docs
24
30
@@ -37,31 +43,24 @@ jobs:
37
43
# Anything that's touching "vendored code"
38
44
- "src/pip/_vendor/**"
39
45
- "pyproject.toml"
46
+ - "noxfile.py"
40
47
tests:
41
- # Anything that's touching testable stuff
48
+ # Anything that's touching code-related stuff
42
49
- ".github/workflows/ci.yml"
43
50
- "src/**"
44
51
- "tests/**"
52
+ - "noxfile.py"
45
53
if : github.event_name == 'pull_request'
46
54
47
- pre-commit :
48
- name : pre-commit
49
- runs-on : ubuntu-latest
50
-
51
- steps :
52
- - uses : actions/checkout@v2
53
- - uses : actions/setup-python@v2
54
- -
uses :
pre-commit/[email protected]
55
- with :
56
- extra_args : --all-files --hook-stage=manual
57
-
58
55
packaging :
59
56
name : packaging
60
57
runs-on : ubuntu-latest
61
58
62
59
steps :
63
- - uses : actions/checkout@v2
64
- - uses : actions/setup-python@v2
60
+ - uses : actions/checkout@v3
61
+ - uses : actions/setup-python@v4
62
+ with :
63
+ python-version : " 3.x"
65
64
- name : Set up git credentials
66
65
run : |
67
66
git config --global user.email "[email protected] "
70
69
- run : pip install nox
71
70
- run : nox -s prepare-release -- 99.9
72
71
- run : nox -s build-release -- 99.9
72
+ - run : pipx run check-manifest
73
73
74
74
vendoring :
75
75
name : vendoring
@@ -81,18 +81,20 @@ jobs:
81
81
github.event_name != 'pull_request'
82
82
83
83
steps :
84
- - uses : actions/checkout@v2
85
- - uses : actions/setup-python@v2
84
+ - uses : actions/checkout@v3
85
+ - uses : actions/setup-python@v4
86
+ with :
87
+ python-version : " 3.x"
86
88
87
- - run : pip install vendoring
88
- - run : vendoring sync . --verbose
89
+ - run : pip install nox
90
+ - run : nox -s vendoring
89
91
- run : git diff --exit-code
90
92
91
93
tests-unix :
92
94
name : tests / ${{ matrix.python }} / ${{ matrix.os }}
93
95
runs-on : ${{ matrix.os }}-latest
94
96
95
- needs : [pre-commit, packaging, determine-changes]
97
+ needs : [packaging, determine-changes]
96
98
if : >-
97
99
needs.determine-changes.outputs.tests == 'true' ||
98
100
github.event_name != 'pull_request'
@@ -102,15 +104,15 @@ jobs:
102
104
matrix :
103
105
os : [Ubuntu, MacOS]
104
106
python :
105
- - 3.6
106
- - 3.7
107
- - 3.8
108
- - 3.9
109
- - " 3.10.0-alpha - 3.10 "
107
+ - " 3.7 "
108
+ - " 3.8 "
109
+ - " 3.9 "
110
+ - " 3.10 "
111
+ - " 3.11 "
110
112
111
113
steps :
112
- - uses : actions/checkout@v2
113
- - uses : actions/setup-python@v2
114
+ - uses : actions/checkout@v3
115
+ - uses : actions/setup-python@v4
114
116
with :
115
117
python-version : ${{ matrix.python }}
116
118
@@ -120,19 +122,19 @@ jobs:
120
122
121
123
- name : Install MacOS dependencies
122
124
if : matrix.os == 'MacOS'
123
- run : brew install bzr
125
+ run : brew install breezy
124
126
125
- - run : pip install tox 'virtualenv<20'
127
+ - run : pip install nox
126
128
127
129
# Main check
128
130
- name : Run unit tests
129
131
run : >-
130
- tox -e py --
132
+ nox -s test-${{ matrix.python }} --
131
133
-m unit
132
134
--verbose --numprocesses auto --showlocals
133
135
- name : Run integration tests
134
136
run : >-
135
- tox -e py --
137
+ nox -s test-${{ matrix.python }} --
136
138
-m integration
137
139
--verbose --numprocesses auto --showlocals
138
140
--durations=5
@@ -141,7 +143,7 @@ jobs:
141
143
name : tests / ${{ matrix.python }} / ${{ matrix.os }} / ${{ matrix.group }}
142
144
runs-on : ${{ matrix.os }}-latest
143
145
144
- needs : [pre-commit, packaging, determine-changes]
146
+ needs : [packaging, determine-changes]
145
147
if : >-
146
148
needs.determine-changes.outputs.tests == 'true' ||
147
149
github.event_name != 'pull_request'
@@ -151,17 +153,17 @@ jobs:
151
153
matrix :
152
154
os : [Windows]
153
155
python :
154
- - 3.6
156
+ - " 3.7 "
155
157
# Commented out, since Windows tests are expensively slow.
156
- # - 3.7
157
- # - 3.8
158
- - 3.9
159
- - " 3.10.0-alpha - 3.10 "
158
+ # - "3.8"
159
+ # - "3.9"
160
+ # - "3.10"
161
+ - " 3.11 "
160
162
group : [1, 2]
161
163
162
164
steps :
163
- - uses : actions/checkout@v2
164
- - uses : actions/setup-python@v2
165
+ - uses : actions/checkout@v3
166
+ - uses : actions/setup-python@v4
165
167
with :
166
168
python-version : ${{ matrix.python }}
167
169
@@ -180,15 +182,15 @@ jobs:
180
182
$acl.AddAccessRule($rule)
181
183
Set-Acl "R:\Temp" $acl
182
184
183
- - run : pip install tox 'virtualenv<20'
185
+ - run : pip install nox
184
186
env :
185
187
TEMP : " R:\\ Temp"
186
188
187
189
# Main check
188
190
- name : Run unit tests
189
191
if : matrix.group == 1
190
192
run : >-
191
- tox -e py --
193
+ nox -s test-${{ matrix.python }} --
192
194
-m unit
193
195
--verbose --numprocesses auto --showlocals
194
196
env :
@@ -197,7 +199,7 @@ jobs:
197
199
- name : Run integration tests (group 1)
198
200
if : matrix.group == 1
199
201
run : >-
200
- tox -e py --
202
+ nox -s test-${{ matrix.python }} --
201
203
-m integration -k "not test_install"
202
204
--verbose --numprocesses auto --showlocals
203
205
env :
@@ -206,8 +208,80 @@ jobs:
206
208
- name : Run integration tests (group 2)
207
209
if : matrix.group == 2
208
210
run : >-
209
- tox -e py --
211
+ nox -s test-${{ matrix.python }} --
210
212
-m integration -k "test_install"
211
213
--verbose --numprocesses auto --showlocals
212
214
env :
213
215
TEMP : " R:\\ Temp"
216
+
217
+ tests-zipapp :
218
+ name : tests / zipapp
219
+ runs-on : ubuntu-latest
220
+
221
+ needs : [packaging, determine-changes]
222
+ if : >-
223
+ needs.determine-changes.outputs.tests == 'true' ||
224
+ github.event_name != 'pull_request'
225
+
226
+ steps :
227
+ - uses : actions/checkout@v3
228
+ - uses : actions/setup-python@v4
229
+ with :
230
+ python-version : " 3.10"
231
+
232
+ - name : Install Ubuntu dependencies
233
+ run : sudo apt-get install bzr
234
+
235
+ - run : pip install nox 'virtualenv<20' 'setuptools != 60.6.0'
236
+
237
+ # Main check
238
+ - name : Run integration tests
239
+ run : >-
240
+ nox -s test-3.10 --
241
+ -m integration
242
+ --verbose --numprocesses auto --showlocals
243
+ --durations=5
244
+ --use-zipapp
245
+
246
+ check : # This job does nothing and is only used for the branch protection
247
+ if : always()
248
+
249
+ needs :
250
+ - determine-changes
251
+ - docs
252
+ - packaging
253
+ - tests-unix
254
+ - tests-windows
255
+ - tests-zipapp
256
+ - vendoring
257
+
258
+ runs-on : ubuntu-latest
259
+
260
+ steps :
261
+ - name : Decide whether the needed jobs succeeded or failed
262
+ uses : re-actors/alls-green@release/v1
263
+ with :
264
+ allowed-skips : >-
265
+ ${{
266
+ (
267
+ needs.determine-changes.outputs.vendoring != 'true'
268
+ && github.event_name == 'pull_request'
269
+ )
270
+ && 'vendoring'
271
+ || ''
272
+ }}
273
+ ,
274
+ ${{
275
+ (
276
+ needs.determine-changes.outputs.tests != 'true'
277
+ && github.event_name == 'pull_request'
278
+ )
279
+ && '
280
+ tests-unix,
281
+ tests-windows,
282
+ tests-zipapp,
283
+ tests-importlib-metadata,
284
+ '
285
+ || ''
286
+ }}
287
+ jobs : ${{ toJSON(needs) }}
0 commit comments