11name : Test
22on : [push, pull_request]
33
4+ permissions :
5+ contents : read
6+
7+ concurrency :
8+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
9+ cancel-in-progress : true
10+
411jobs :
512 tests :
613 runs-on : ubuntu-latest
714 strategy :
815 matrix :
9- python-version : [3.6, 3.7, 3.8, 3.9, 3.10-dev]
10- max-parallel : 1
16+ python :
17+ - " 3.8"
18+ - " 3.9"
19+ - " 3.10"
20+ - " 3.11"
21+ - " 3.12-dev"
22+ fail-fast : false
1123
1224 steps :
13- - name : Print github context
14- env :
15- GITHUB_CONTEXT : ${{ toJson(github) }}
16- run : echo $GITHUB_CONTEXT
17-
18- - name : Checkout code
19- uses : actions/checkout@v2
20- with :
21- fetch-depth : 1
22-
23- - name : pycache
24- uses : actions/cache@v2
25- id : pycache
26- with :
27- path : ~/.cache/pip
28- key : ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
29- restore-keys : |
30- ${{ runner.os }}-pip-
31-
32- - name : Setup python ${{ matrix.python-version }}
33- uses : actions/setup-python@v2
34- if : " !endsWith(matrix.python-version, '-dev')"
35- with :
36- python-version : ${{ matrix.python-version }}
37-
38- - name : Setup python ${{ matrix.python-version }} (via deadsnakes)
39- uses : deadsnakes/action@v2.1.1
40- if : " endsWith(matrix.python-version, '-dev')"
25+ - uses : actions/checkout@v3
26+ - name : Setup Python ${{ matrix.python }}
27+ uses : actions/setup-python@v4
4128 with :
42- python-version : ${{ matrix.python-version }}
43-
44- - name : Install tox and test related
29+ python-version : ${{ matrix.python }}
30+ - name : Install dependencies
4531 run : |
4632 python -m pip install --upgrade pip
47- pip install tox tox-gh-actions
33+ python -m pip install --upgrade tox
4834
4935 - name : Run tox
5036 run : |
@@ -55,23 +41,21 @@ jobs:
5541 runs-on : ubuntu-latest
5642 strategy :
5743 matrix :
58- env : [flake8, mypy]
44+ env :
45+ - flake8
46+ - mypy
5947
6048 steps :
61- - name : Checkout code
62- uses : actions/checkout@v2
63- with :
64- fetch-depth : 1
65-
49+ - uses : actions/checkout@v3
6650 - name : Setup python
67- uses : actions/setup-python@v2
51+ uses : actions/setup-python@v4
6852 with :
69- python-version : 3.8
53+ python-version : " 3 "
7054
71- - name : Install tox and any other dependencies for test
55+ - name : Install dependencies
7256 run : |
7357 python -m pip install --upgrade pip
74- pip install tox tox-gh-actions
58+ python -m pip install --upgrade tox
7559
7660 - name : Run tox
7761 run : tox -e ${{ matrix.env }}
0 commit comments