8
8
pull_request : ~
9
9
10
10
env :
11
- CACHE_VERSION : 2
11
+ CACHE_VERSION : 3
12
12
KEY_PREFIX : venv
13
- DEFAULT_PYTHON : " 3.10 "
13
+ DEFAULT_PYTHON : " 3.11 "
14
14
PRE_COMMIT_CACHE : ~/.cache/pre-commit
15
15
16
16
jobs :
@@ -20,10 +20,10 @@ jobs:
20
20
timeout-minutes : 20
21
21
steps :
22
22
- name : Check out code from GitHub
23
- uses : actions/checkout@v3.1 .0
23
+ uses : actions/checkout@v3.2 .0
24
24
- name : Set up Python ${{ env.DEFAULT_PYTHON }}
25
25
id : python
26
- uses : actions/setup-python@v4.3 .0
26
+ uses : actions/setup-python@v4.4 .0
27
27
with :
28
28
python-version : ${{ env.DEFAULT_PYTHON }}
29
29
check-latest : true
36
36
'requirements_test_pre_commit.txt') }}" >> $GITHUB_OUTPUT
37
37
- name : Restore Python virtual environment
38
38
id : cache-venv
39
- uses : actions/cache@v3.0.11
39
+ uses : actions/cache@v3.2.2
40
40
with :
41
41
path : venv
42
42
key : >-
56
56
hashFiles('.pre-commit-config.yaml') }}" >> $GITHUB_OUTPUT
57
57
- name : Restore pre-commit environment
58
58
id : cache-precommit
59
- uses : actions/cache@v3.0.11
59
+ uses : actions/cache@v3.2.2
60
60
with :
61
61
path : ${{ env.PRE_COMMIT_CACHE }}
62
62
key : >-
@@ -83,10 +83,10 @@ jobs:
83
83
python-key : ${{ steps.generate-python-key.outputs.key }}
84
84
steps :
85
85
- name : Check out code from GitHub
86
- uses : actions/checkout@v3.1 .0
86
+ uses : actions/checkout@v3.2 .0
87
87
- name : Set up Python ${{ matrix.python-version }}
88
88
id : python
89
- uses : actions/setup-python@v4.3 .0
89
+ uses : actions/setup-python@v4.4 .0
90
90
with :
91
91
python-version : ${{ matrix.python-version }}
92
92
check-latest : true
@@ -103,7 +103,7 @@ jobs:
103
103
$GITHUB_OUTPUT
104
104
- name : Restore Python virtual environment
105
105
id : cache-venv
106
- uses : actions/cache@v3.0.11
106
+ uses : actions/cache@v3.2.2
107
107
with :
108
108
path : venv
109
109
key : >-
@@ -120,59 +120,13 @@ jobs:
120
120
- name : Run pytest
121
121
run : |
122
122
. venv/bin/activate
123
- pytest --cov --cov-report= tests/
123
+ pytest --cov
124
124
- name : Upload coverage artifact
125
125
126
126
with :
127
- name : coverage-${{ matrix.python-version }}
127
+ name : coverage-linux- ${{ matrix.python-version }}
128
128
path : .coverage
129
129
130
- coverage :
131
- name : tests / process / coverage
132
- runs-on : ubuntu-latest
133
- timeout-minutes : 5
134
- needs : ["tests-linux"]
135
- strategy :
136
- matrix :
137
- python-version : ["3.10"]
138
- env :
139
- COVERAGERC_FILE : .coveragerc
140
- steps :
141
- - name : Check out code from GitHub
142
-
143
- - name : Set up Python ${{ matrix.python-version }}
144
- id : python
145
-
146
- with :
147
- python-version : ${{ matrix.python-version }}
148
- check-latest : true
149
- - name : Restore Python virtual environment
150
- id : cache-venv
151
-
152
- with :
153
- path : venv
154
- key :
155
- ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
156
- needs.tests-linux.outputs.python-key }}
157
- - name : Fail job if Python cache restore failed
158
- if : steps.cache-venv.outputs.cache-hit != 'true'
159
- run : |
160
- echo "Failed to restore Python venv from cache"
161
- exit 1
162
- - name : Download all coverage artifacts
163
-
164
- - name : Combine coverage results
165
- run : |
166
- . venv/bin/activate
167
- coverage combine coverage*/.coverage
168
- coverage report --rcfile=${{ env.COVERAGERC_FILE }}
169
- - name : Upload coverage to Coveralls
170
- env :
171
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
172
- run : |
173
- . venv/bin/activate
174
- coveralls --rcfile=${{ env.COVERAGERC_FILE }} --service=github
175
-
176
130
tests-windows :
177
131
name : tests / run / ${{ matrix.python-version }} / Windows
178
132
runs-on : windows-latest
@@ -188,10 +142,10 @@ jobs:
188
142
# Workaround to set correct temp directory on Windows
189
143
# https://github.com/actions/virtual-environments/issues/712
190
144
- name : Check out code from GitHub
191
- uses : actions/checkout@v3.1 .0
145
+ uses : actions/checkout@v3.2 .0
192
146
- name : Set up Python ${{ matrix.python-version }}
193
147
id : python
194
- uses : actions/setup-python@v4.3 .0
148
+ uses : actions/setup-python@v4.4 .0
195
149
with :
196
150
python-version : ${{ matrix.python-version }}
197
151
check-latest : true
@@ -203,7 +157,7 @@ jobs:
203
157
'requirements_test_brain.txt') }}" >> $env:GITHUB_OUTPUT
204
158
- name : Restore Python virtual environment
205
159
id : cache-venv
206
- uses : actions/cache@v3.0.11
160
+ uses : actions/cache@v3.2.2
207
161
with :
208
162
path : venv
209
163
key : >-
@@ -220,7 +174,12 @@ jobs:
220
174
- name : Run pytest
221
175
run : |
222
176
. venv\\Scripts\\activate
223
- pytest tests/
177
+ pytest --cov
178
+ - name : Upload coverage artifact
179
+
180
+ with :
181
+ name : coverage-windows-${{ matrix.python-version }}
182
+ path : .coverage
224
183
225
184
tests-pypy :
226
185
name : tests / run / ${{ matrix.python-version }} / Linux
@@ -232,10 +191,10 @@ jobs:
232
191
python-version : ["pypy3.7", "pypy3.8", "pypy3.9"]
233
192
steps :
234
193
- name : Check out code from GitHub
235
- uses : actions/checkout@v3.1 .0
194
+ uses : actions/checkout@v3.2 .0
236
195
- name : Set up Python ${{ matrix.python-version }}
237
196
id : python
238
- uses : actions/setup-python@v4.3 .0
197
+ uses : actions/setup-python@v4.4 .0
239
198
with :
240
199
python-version : ${{ matrix.python-version }}
241
200
check-latest : true
@@ -247,7 +206,7 @@ jobs:
247
206
}}" >> $GITHUB_OUTPUT
248
207
- name : Restore Python virtual environment
249
208
id : cache-venv
250
- uses : actions/cache@v3.0.11
209
+ uses : actions/cache@v3.2.2
251
210
with :
252
211
path : venv
253
212
key : >-
@@ -264,4 +223,58 @@ jobs:
264
223
- name : Run pytest
265
224
run : |
266
225
. venv/bin/activate
267
- pytest tests/
226
+ pytest --cov
227
+ - name : Upload coverage artifact
228
+
229
+ with :
230
+ name : coverage-pypy-${{ matrix.python-version }}
231
+ path : .coverage
232
+
233
+ coverage :
234
+ name : tests / process / coverage
235
+ runs-on : ubuntu-latest
236
+ timeout-minutes : 10
237
+ needs : ["tests-linux", "tests-windows", "tests-pypy"]
238
+ steps :
239
+ - name : Check out code from GitHub
240
+
241
+ - name : Set up Python 3.11
242
+ id : python
243
+
244
+ with :
245
+ python-version : " 3.11"
246
+ check-latest : true
247
+ - name : Install dependencies
248
+ run : pip install -U -r requirements_test_min.txt
249
+ - name : Download all coverage artifacts
250
+
251
+ - name : Combine Linux coverage results
252
+ run : |
253
+ coverage combine coverage-linux*/.coverage
254
+ coverage xml -o coverage-linux.xml
255
+ - uses : codecov/codecov-action@v3
256
+ with :
257
+ fail_ci_if_error : true
258
+ verbose : true
259
+ flags : linux
260
+ files : coverage-linux.xml
261
+ - name : Combine Windows coverage results
262
+ run : |
263
+ coverage combine coverage-windows*/.coverage
264
+ coverage xml -o coverage-windows.xml
265
+ - uses : codecov/codecov-action@v3
266
+ with :
267
+ fail_ci_if_error : true
268
+ verbose : true
269
+ flags : windows
270
+ files : coverage-windows.xml
271
+ - name : Combine PyPy coverage results
272
+ run : |
273
+ coverage combine coverage-pypy*/.coverage
274
+ coverage xml -o coverage-pypy.xml
275
+ - uses : codecov/codecov-action@v3
276
+ with :
277
+ fail_ci_if_error : true
278
+ verbose : true
279
+ flags : pypy
280
+ files : coverage-pypy.xml
0 commit comments