1010
1111env :
1212 CACHE_VERSION : 1
13- DEFAULT_PYTHON : 3.8
13+ DEFAULT_PYTHON : " 3.10 "
1414 PRE_COMMIT_HOME : ~/.cache/pre-commit
1515
1616jobs :
1717 # Separate job to pre-populate the base dependency cache
1818 # This prevent upcoming jobs to do the same individually
1919 prepare-base :
2020 name : Prepare base dependencies
21- runs-on : ubuntu-20.04
21+ runs-on : ubuntu-latest
2222 steps :
2323 - name : Check out code from GitHub
24- uses : actions/checkout@v2
24+ uses : actions/checkout@v5
2525 - name : Set up Python ${{ env.DEFAULT_PYTHON }}
2626 id : python
27- uses : actions/setup-python@v2.2.1
27+ uses : actions/setup-python@v5
2828 with :
2929 python-version : ${{ env.DEFAULT_PYTHON }}
3030 - name : Restore base Python virtual environment
3131 id : cache-venv
32- uses : actions/cache@v2.1.4
32+ uses : actions/cache@v4
3333 with :
3434 path : venv
3535 key : >-
@@ -44,13 +44,14 @@ jobs:
4444 - name : Create Python virtual environment
4545 if : steps.cache-venv.outputs.cache-hit != 'true'
4646 run : |
47+ sudo apt-get update && sudo apt-get install -y libxml2-dev libxslt1-dev python3-dev build-essential
4748 python -m venv venv
4849 . venv/bin/activate
4950 pip install -U "pip<20.3" setuptools
5051 pip install -r requirements_all.txt -r requirements_test_all.txt
5152 - name : Restore pre-commit environment from cache
5253 id : cache-precommit
53- uses : actions/cache@v2.1.4
54+ uses : actions/cache@v4
5455 with :
5556 path : ${{ env.PRE_COMMIT_HOME }}
5657 key : |
@@ -65,19 +66,19 @@ jobs:
6566
6667 lint-bandit :
6768 name : Check bandit
68- runs-on : ubuntu-20.04
69+ runs-on : ubuntu-latest
6970 needs : prepare-base
7071 steps :
7172 - name : Check out code from GitHub
72- uses : actions/checkout@v2
73+ uses : actions/checkout@v5
7374 - name : Set up Python ${{ env.DEFAULT_PYTHON }}
74- uses : actions/setup-python@v2.2.1
75+ uses : actions/setup-python@v5
7576 id : python
7677 with :
7778 python-version : ${{ env.DEFAULT_PYTHON }}
7879 - name : Restore base Python virtual environment
7980 id : cache-venv
80- uses : actions/cache@v2.1.4
81+ uses : actions/cache@v4
8182 with :
8283 path : venv
8384 key : >-
9293 exit 1
9394 - name : Restore pre-commit environment from cache
9495 id : cache-precommit
95- uses : actions/cache@v2.1.4
96+ uses : actions/cache@v4
9697 with :
9798 path : ${{ env.PRE_COMMIT_HOME }}
9899 key : |
@@ -109,19 +110,19 @@ jobs:
109110
110111 lint-black :
111112 name : Check black
112- runs-on : ubuntu-20.04
113+ runs-on : ubuntu-latest
113114 needs : prepare-base
114115 steps :
115116 - name : Check out code from GitHub
116- uses : actions/checkout@v2
117+ uses : actions/checkout@v5
117118 - name : Set up Python ${{ env.DEFAULT_PYTHON }}
118- uses : actions/setup-python@v2.2.1
119+ uses : actions/setup-python@v5
119120 id : python
120121 with :
121122 python-version : ${{ env.DEFAULT_PYTHON }}
122123 - name : Restore base Python virtual environment
123124 id : cache-venv
124- uses : actions/cache@v2.1.4
125+ uses : actions/cache@v4
125126 with :
126127 path : venv
127128 key : >-
@@ -136,7 +137,7 @@ jobs:
136137 exit 1
137138 - name : Restore pre-commit environment from cache
138139 id : cache-precommit
139- uses : actions/cache@v2.1.4
140+ uses : actions/cache@v4
140141 with :
141142 path : ${{ env.PRE_COMMIT_HOME }}
142143 key : |
@@ -153,19 +154,19 @@ jobs:
153154
154155 lint-codespell :
155156 name : Check codespell
156- runs-on : ubuntu-20.04
157+ runs-on : ubuntu-latest
157158 needs : prepare-base
158159 steps :
159160 - name : Check out code from GitHub
160- uses : actions/checkout@v2
161+ uses : actions/checkout@v5
161162 - name : Set up Python ${{ env.DEFAULT_PYTHON }}
162- uses : actions/setup-python@v2.2.1
163+ uses : actions/setup-python@v5
163164 id : python
164165 with :
165166 python-version : ${{ env.DEFAULT_PYTHON }}
166167 - name : Restore base Python virtual environment
167168 id : cache-venv
168- uses : actions/cache@v2.1.4
169+ uses : actions/cache@v4
169170 with :
170171 path : venv
171172 key : >-
@@ -180,7 +181,7 @@ jobs:
180181 exit 1
181182 - name : Restore pre-commit environment from cache
182183 id : cache-precommit
183- uses : actions/cache@v2.1.4
184+ uses : actions/cache@v4
184185 with :
185186 path : ${{ env.PRE_COMMIT_HOME }}
186187 key : |
@@ -200,19 +201,19 @@ jobs:
200201
201202 lint-executable-shebangs :
202203 name : Check executables
203- runs-on : ubuntu-20.04
204+ runs-on : ubuntu-latest
204205 needs : prepare-base
205206 steps :
206207 - name : Check out code from GitHub
207- uses : actions/checkout@v2
208+ uses : actions/checkout@v5
208209 - name : Set up Python ${{ env.DEFAULT_PYTHON }}
209- uses : actions/setup-python@v2.2.1
210+ uses : actions/setup-python@v5
210211 id : python
211212 with :
212213 python-version : ${{ env.DEFAULT_PYTHON }}
213214 - name : Restore base Python virtual environment
214215 id : cache-venv
215- uses : actions/cache@v2.1.4
216+ uses : actions/cache@v4
216217 with :
217218 path : venv
218219 key : >-
@@ -227,7 +228,7 @@ jobs:
227228 exit 1
228229 - name : Restore pre-commit environment from cache
229230 id : cache-precommit
230- uses : actions/cache@v2.1.4
231+ uses : actions/cache@v4
231232 with :
232233 path : ${{ env.PRE_COMMIT_HOME }}
233234 key : |
@@ -247,19 +248,19 @@ jobs:
247248
248249 lint-flake8 :
249250 name : Check flake8
250- runs-on : ubuntu-20.04
251+ runs-on : ubuntu-latest
251252 needs : prepare-base
252253 steps :
253254 - name : Check out code from GitHub
254- uses : actions/checkout@v2
255+ uses : actions/checkout@v5
255256 - name : Set up Python ${{ env.DEFAULT_PYTHON }}
256- uses : actions/setup-python@v2.2.1
257+ uses : actions/setup-python@v5
257258 id : python
258259 with :
259260 python-version : ${{ env.DEFAULT_PYTHON }}
260261 - name : Restore base Python virtual environment
261262 id : cache-venv
262- uses : actions/cache@v2.1.4
263+ uses : actions/cache@v4
263264 with :
264265 path : venv
265266 key : >-
@@ -274,7 +275,7 @@ jobs:
274275 exit 1
275276 - name : Restore pre-commit environment from cache
276277 id : cache-precommit
277- uses : actions/cache@v2.1.4
278+ uses : actions/cache@v4
278279 with :
279280 path : ${{ env.PRE_COMMIT_HOME }}
280281 key : |
@@ -294,19 +295,19 @@ jobs:
294295
295296 lint-isort :
296297 name : Check isort
297- runs-on : ubuntu-20.04
298+ runs-on : ubuntu-latest
298299 needs : prepare-base
299300 steps :
300301 - name : Check out code from GitHub
301- uses : actions/checkout@v2
302+ uses : actions/checkout@v5
302303 - name : Set up Python ${{ env.DEFAULT_PYTHON }}
303- uses : actions/setup-python@v2.2.1
304+ uses : actions/setup-python@v5
304305 id : python
305306 with :
306307 python-version : ${{ env.DEFAULT_PYTHON }}
307308 - name : Restore base Python virtual environment
308309 id : cache-venv
309- uses : actions/cache@v2.1.4
310+ uses : actions/cache@v4
310311 with :
311312 path : venv
312313 key : >-
@@ -321,7 +322,7 @@ jobs:
321322 exit 1
322323 - name : Restore pre-commit environment from cache
323324 id : cache-precommit
324- uses : actions/cache@v2.1.4
325+ uses : actions/cache@v4
325326 with :
326327 path : ${{ env.PRE_COMMIT_HOME }}
327328 key : |
@@ -338,19 +339,19 @@ jobs:
338339
339340 lint-json :
340341 name : Check JSON
341- runs-on : ubuntu-20.04
342+ runs-on : ubuntu-latest
342343 needs : prepare-base
343344 steps :
344345 - name : Check out code from GitHub
345- uses : actions/checkout@v2
346+ uses : actions/checkout@v5
346347 - name : Set up Python ${{ env.DEFAULT_PYTHON }}
347- uses : actions/setup-python@v2.2.1
348+ uses : actions/setup-python@v5
348349 id : python
349350 with :
350351 python-version : ${{ env.DEFAULT_PYTHON }}
351352 - name : Restore base Python virtual environment
352353 id : cache-venv
353- uses : actions/cache@v2.1.4
354+ uses : actions/cache@v4
354355 with :
355356 path : venv
356357 key : >-
@@ -365,7 +366,7 @@ jobs:
365366 exit 1
366367 - name : Restore pre-commit environment from cache
367368 id : cache-precommit
368- uses : actions/cache@v2.1.4
369+ uses : actions/cache@v4
369370 with :
370371 path : ${{ env.PRE_COMMIT_HOME }}
371372 key : |
@@ -385,19 +386,19 @@ jobs:
385386
386387 lint-pyupgrade :
387388 name : Check pyupgrade
388- runs-on : ubuntu-20.04
389+ runs-on : ubuntu-latest
389390 needs : prepare-base
390391 steps :
391392 - name : Check out code from GitHub
392- uses : actions/checkout@v2
393+ uses : actions/checkout@v5
393394 - name : Set up Python ${{ env.DEFAULT_PYTHON }}
394- uses : actions/setup-python@v2.2.1
395+ uses : actions/setup-python@v5
395396 id : python
396397 with :
397398 python-version : ${{ env.DEFAULT_PYTHON }}
398399 - name : Restore base Python virtual environment
399400 id : cache-venv
400- uses : actions/cache@v2.1.4
401+ uses : actions/cache@v4
401402 with :
402403 path : venv
403404 key : >-
@@ -412,7 +413,7 @@ jobs:
412413 exit 1
413414 - name : Restore pre-commit environment from cache
414415 id : cache-precommit
415- uses : actions/cache@v2.1.4
416+ uses : actions/cache@v4
416417 with :
417418 path : ${{ env.PRE_COMMIT_HOME }}
418419 key : |
@@ -429,19 +430,19 @@ jobs:
429430
430431 lint-yaml :
431432 name : Check YAML
432- runs-on : ubuntu-20.04
433+ runs-on : ubuntu-latest
433434 needs : prepare-base
434435 steps :
435436 - name : Check out code from GitHub
436- uses : actions/checkout@v2
437+ uses : actions/checkout@v5
437438 - name : Set up Python ${{ env.DEFAULT_PYTHON }}
438- uses : actions/setup-python@v2.2.1
439+ uses : actions/setup-python@v5
439440 id : python
440441 with :
441442 python-version : ${{ env.DEFAULT_PYTHON }}
442443 - name : Restore base Python virtual environment
443444 id : cache-venv
444- uses : actions/cache@v2.1.4
445+ uses : actions/cache@v4
445446 with :
446447 path : venv
447448 key : >-
@@ -456,7 +457,7 @@ jobs:
456457 exit 1
457458 - name : Restore pre-commit environment from cache
458459 id : cache-precommit
459- uses : actions/cache@v2.1.4
460+ uses : actions/cache@v4
460461 with :
461462 path : ${{ env.PRE_COMMIT_HOME }}
462463 key : |
@@ -475,11 +476,11 @@ jobs:
475476 pre-commit run --hook-stage manual yamllint --all-files --show-diff-on-failure
476477 pylint :
477478 name : Check pylint
478- runs-on : ubuntu-20.04
479+ runs-on : ubuntu-latest
479480 steps :
480- - uses : actions/checkout@v2
481+ - uses : actions/checkout@v5
481482 - name : Set up python ${{ env.DEFAULT_PYTHON }}
482- uses : actions/setup-python@v1
483+ uses : actions/setup-python@v5
483484 with :
484485 python-version : ${{ env.DEFAULT_PYTHON }}
485486 - name : Install dependencies
0 commit comments