1
1
name : Test
2
2
on : [push, pull_request]
3
3
4
+ permissions :
5
+ contents : read
6
+
7
+ concurrency :
8
+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
9
+ cancel-in-progress : true
10
+
4
11
jobs :
5
12
tests :
6
13
runs-on : ubuntu-latest
7
14
strategy :
8
15
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
11
23
12
24
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
41
28
with :
42
- python-version : ${{ matrix.python-version }}
43
-
44
- - name : Install tox and test related
29
+ python-version : ${{ matrix.python }}
30
+ - name : Install dependencies
45
31
run : |
46
32
python -m pip install --upgrade pip
47
- pip install tox tox-gh-actions
33
+ python -m pip install --upgrade tox
48
34
49
35
- name : Run tox
50
36
run : |
@@ -55,23 +41,21 @@ jobs:
55
41
runs-on : ubuntu-latest
56
42
strategy :
57
43
matrix :
58
- env : [flake8, mypy]
44
+ env :
45
+ - flake8
46
+ - mypy
59
47
60
48
steps :
61
- - name : Checkout code
62
- uses : actions/checkout@v2
63
- with :
64
- fetch-depth : 1
65
-
49
+ - uses : actions/checkout@v3
66
50
- name : Setup python
67
- uses : actions/setup-python@v2
51
+ uses : actions/setup-python@v4
68
52
with :
69
- python-version : 3.8
53
+ python-version : " 3 "
70
54
71
- - name : Install tox and any other dependencies for test
55
+ - name : Install dependencies
72
56
run : |
73
57
python -m pip install --upgrade pip
74
- pip install tox tox-gh-actions
58
+ python -m pip install --upgrade tox
75
59
76
60
- name : Run tox
77
61
run : tox -e ${{ matrix.env }}
0 commit comments