@@ -12,85 +12,78 @@ jobs:
12
12
fail-fast : false
13
13
matrix :
14
14
include :
15
- - { python-version: 3.9, os: ubuntu-latest, session: "pre-commit" }
16
- - { python-version: 3.9, os: ubuntu-latest, session: "safety" }
17
- - { python-version: 3.9, os: ubuntu-latest, session: "mypy" }
18
- - { python-version: 3.8, os: ubuntu-latest, session: "mypy" }
19
- - { python-version: 3.7, os: ubuntu-latest, session: "mypy" }
20
- - { python-version: 3.9, os: ubuntu-latest, session: "tests" }
21
- - { python-version: 3.8, os: ubuntu-latest, session: "tests" }
22
- - { python-version: 3.7, os: ubuntu-latest, session: "tests" }
23
- - { python-version: 3.9, os: windows-latest, session: "tests" }
24
- - { python-version: 3.9, os: macos-latest, session: "tests" }
25
- # - { python-version: 3.9, os: ubuntu-latest, session: "typeguard" }
26
- - { python-version: 3.9, os: ubuntu-latest, session: "xdoctest" }
27
- - { python-version: 3.9, os: ubuntu-latest, session: "docs-build" }
15
+ - { python: " 3.9" , os: ubuntu-latest, session: "pre-commit" }
16
+ - { python: " 3.9" , os: ubuntu-latest, session: "safety" }
17
+ - { python: " 3.9" , os: ubuntu-latest, session: "mypy" }
18
+ - { python: " 3.8" , os: ubuntu-latest, session: "mypy" }
19
+ - { python: " 3.7" , os: ubuntu-latest, session: "mypy" }
20
+ - { python: " 3.9" , os: ubuntu-latest, session: "tests" }
21
+ - { python: " 3.8" , os: ubuntu-latest, session: "tests" }
22
+ - { python: " 3.7" , os: ubuntu-latest, session: "tests" }
23
+ - { python: " 3.9" , os: windows-latest, session: "tests" }
24
+ - { python: " 3.9" , os: macos-latest, session: "tests" }
25
+ # - { python: " 3.9" , os: ubuntu-latest, session: "typeguard" }
26
+ - { python: " 3.9" , os: ubuntu-latest, session: "xdoctest" }
27
+ - { python: " 3.9" , os: ubuntu-latest, session: "docs-build" }
28
28
29
29
env :
30
30
NOXSESSION : ${{ matrix.session }}
31
31
32
32
steps :
33
33
- name : Check out the repository
34
- uses : actions/checkout@v2.3.4
34
+ uses : actions/checkout@v3
35
35
36
- - name : Set up Python ${{ matrix.python-version }}
37
- uses : actions/setup-python@v2.2.1
36
+ - name : Set up Python ${{ matrix.python }}
37
+ uses : actions/setup-python@v4
38
38
with :
39
- python-version : ${{ matrix.python-version }}
39
+ python-version : ${{ matrix.python }}
40
40
41
41
- name : Upgrade pip
42
42
run : |
43
43
pip install --constraint=.github/workflows/constraints.txt pip
44
44
pip --version
45
-
46
45
- name : Install Poetry
47
46
run : |
48
- pip install --constraint=.github/workflows/constraints.txt poetry
47
+ pipx install --pip-args= --constraint=.github/workflows/constraints.txt poetry
49
48
poetry --version
50
-
51
49
- name : Install Nox
52
50
run : |
53
- pip install --constraint=.github/workflows/constraints.txt nox nox-poetry
51
+ pipx install --pip-args=--constraint=.github/workflows/constraints.txt nox
52
+ pipx inject --pip-args=--constraint=.github/workflows/constraints.txt nox nox-poetry
54
53
nox --version
55
-
56
54
- name : Compute pre-commit cache key
57
55
if : matrix.session == 'pre-commit'
58
56
id : pre-commit-cache
59
57
shell : python
60
58
run : |
61
59
import hashlib
62
60
import sys
63
-
64
61
python = "py{}.{}".format(*sys.version_info[:2])
65
62
payload = sys.version.encode() + sys.executable.encode()
66
63
digest = hashlib.sha256(payload).hexdigest()
67
64
result = "${{ runner.os }}-{}-{}-pre-commit".format(python, digest[:8])
68
-
69
65
print("::set-output name=result::{}".format(result))
70
-
71
66
- name : Restore pre-commit cache
72
- uses : actions/cache@v2.1.3
67
+ uses : actions/cache@v3
73
68
if : matrix.session == 'pre-commit'
74
69
with :
75
70
path : ~/.cache/pre-commit
76
71
key : ${{ steps.pre-commit-cache.outputs.result }}-${{ hashFiles('.pre-commit-config.yaml') }}
77
72
restore-keys : |
78
73
${{ steps.pre-commit-cache.outputs.result }}-
79
-
80
74
- name : Run Nox
81
75
run : |
82
- nox --force-color --python=${{ matrix.python-version }}
83
-
76
+ nox --force-color --python=${{ matrix.python }}
84
77
- name : Upload coverage data
85
78
if : always() && matrix.session == 'tests'
86
- uses : " actions/upload-artifact@v2.2.2 "
79
+ uses : " actions/upload-artifact@v3 "
87
80
with :
88
81
name : coverage-data
89
82
path : " .coverage.*"
90
83
91
84
- name : Upload documentation
92
85
if : matrix.session == 'docs-build'
93
- uses : actions/upload-artifact@v2.2.2
86
+ uses : actions/upload-artifact@v3
94
87
with :
95
88
name : docs
96
89
path : docs/_build
@@ -100,40 +93,36 @@ jobs:
100
93
needs : tests
101
94
steps :
102
95
- name : Check out the repository
103
- uses : actions/checkout@v2.3.4
96
+ uses : actions/checkout@v3
104
97
105
- - name : Set up Python 3.9
106
- uses : actions/setup-python@v2.2.1
98
+ - name : Set up Python
99
+ uses : actions/setup-python@v4
107
100
with :
108
- python-version : 3.9
101
+ python-version : " 3.9"
109
102
110
103
- name : Upgrade pip
111
104
run : |
112
105
pip install --constraint=.github/workflows/constraints.txt pip
113
106
pip --version
114
-
115
107
- name : Install Poetry
116
108
run : |
117
- pip install --constraint=.github/workflows/constraints.txt poetry
109
+ pipx install --pip-args= --constraint=.github/workflows/constraints.txt poetry
118
110
poetry --version
119
-
120
111
- name : Install Nox
121
112
run : |
122
- pip install --constraint=.github/workflows/constraints.txt nox nox-poetry
113
+ pipx install --pip-args=--constraint=.github/workflows/constraints.txt nox
114
+ pipx inject --pip-args=--constraint=.github/workflows/constraints.txt nox nox-poetry
123
115
nox --version
124
-
125
116
- name : Download coverage data
126
- uses : actions/download-artifact@v2.0.8
117
+ uses : actions/download-artifact@v3
127
118
with :
128
119
name : coverage-data
129
120
130
121
- name : Combine coverage data and display human readable report
131
122
run : |
132
123
nox --force-color --session=coverage
133
-
134
124
- name : Create coverage report
135
125
run : |
136
126
nox --force-color --session=coverage -- xml
137
-
138
127
- name : Upload coverage report
139
- uses : codecov/codecov-action@v1.2.1
128
+ uses : codecov/codecov-action@v3
0 commit comments