@@ -36,31 +36,37 @@ jobs:
36
36
!contains(github.event.head_commit.message, '[skip_ci]')
37
37
steps :
38
38
- name : Check out the repository
39
- uses : actions/checkout@v3.2.0
39
+ uses : actions/checkout@v3.5.3
40
40
41
- - name : Set up Python 3.11
42
- uses : actions/setup-python@v4.3 .1
41
+ - name : Set up Python 3.10 # on 3.11 pip install in unstable: "canonicalize" fails occasionally
42
+ uses : actions/setup-python@v4.6 .1
43
43
with :
44
- python-version : ' 3.11 '
44
+ python-version : ' 3.10 '
45
45
46
- - name : Upgrade pip
46
+ - name : Use frozen pip version
47
47
run : |
48
48
pip install --constraint=.github/constraints.txt pip
49
49
pip --version
50
50
51
- - name : Install Poetry
52
- run : |
53
- pip install --constraint=.github/constraints.txt poetry
54
- poetry --version
55
-
56
51
- name : Install Nox
57
52
run : |
58
53
pip install --constraint=.github/constraints.txt nox
59
54
nox --version
60
55
61
- # - name: Run safety session
62
- # run: |
63
- # nox --force-color --session=safety
56
+ - name : Load poetry cache
57
+ id : cached-poetry-dependencies
58
+
59
+ with :
60
+ path : |
61
+ .cache/pypoetry
62
+ key : poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
63
+
64
+ - name : Install Poetry
65
+ run : |
66
+ pip install --constraint=.github/constraints.txt poetry
67
+ poetry --version
68
+ poetry config --local cache-dir .cache/pypoetry
69
+ poetry config --local virtualenvs.create false
64
70
65
71
- name : Run pre commit checks
66
72
run : |
@@ -75,34 +81,45 @@ jobs:
75
81
needs : lint
76
82
steps :
77
83
- name : Check out the repository
78
-
84
+
85
+ with :
86
+ fetch-depth : 1
79
87
80
88
- name : Set up Python 3.11
81
- uses : actions/setup-python@v4.3 .1
89
+ uses : actions/setup-python@v4.6 .1
82
90
with :
83
91
python-version : ' 3.11'
84
92
85
- - name : Upgrade pip
93
+ - name : Use frozen pip version
86
94
run : |
87
95
pip install --constraint=.github/constraints.txt pip
88
96
pip --version
89
97
90
- - name : Install Poetry
91
- run : |
92
- pip install --constraint=.github/constraints.txt poetry
93
- poetry --version
94
-
95
98
- name : Install Nox
96
99
run : |
97
100
pip install --constraint=.github/constraints.txt nox
98
101
nox --version
99
102
103
+ - name : Load poetry cache
104
+ id : cached-poetry-dependencies
105
+
106
+ with :
107
+ path : |
108
+ .cache/pypoetry
109
+ key : poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
110
+
111
+ - name : Install Poetry
112
+ run : |
113
+ pip install --constraint=.github/constraints.txt poetry
114
+ poetry --version
115
+ poetry config --local cache-dir .cache/pypoetry
116
+ poetry config --local virtualenvs.create false
117
+ poetry env info
118
+
100
119
- name : Build documentation
101
120
run : |
102
121
nox --force-color --session=docs-build
103
122
104
-
105
-
106
123
tests :
107
124
name : " Python ${{ matrix.python-version }} on ${{ matrix.os }}"
108
125
needs : lint
@@ -112,31 +129,50 @@ jobs:
112
129
matrix :
113
130
os : [ubuntu-latest, macos-latest, windows-latest]
114
131
python-version : ['3.8', '3.9', '3.10', '3.11']
132
+
115
133
steps :
134
+
116
135
- name : Checkout repository
117
- uses : actions/checkout@v3.2.0
136
+ uses : actions/checkout@v3.5.3
118
137
with :
119
138
fetch-depth : 1
120
-
139
+
140
+
121
141
with :
122
142
python-version : ${{ matrix.python-version }}
123
143
architecture : x64
144
+
124
145
- name : Use frozen pip version
125
146
run : |
126
147
pip install --constraint=.github/constraints.txt pip virtualenv
127
148
pip --version
149
+
128
150
- name : Install nox
129
151
run : |
130
152
pip install --constraint=.github/constraints.txt nox
131
153
nox --version
132
- - name : Install poetry
154
+
155
+ - name : Load poetry cache
156
+ id : cached-poetry-dependencies
157
+
158
+ with :
159
+ path : |
160
+ .cache/pypoetry
161
+ key : poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
162
+
163
+ - name : Install Poetry
133
164
run : |
134
165
pip install --constraint=.github/constraints.txt poetry
135
166
poetry --version
167
+ poetry config --local cache-dir .cache/pypoetry
168
+ poetry config --local virtualenvs.create false
169
+ poetry env info
170
+
136
171
- name : Run nox tests
137
172
run : nox --force-color --session tests --python ${{ matrix.python-version }}
173
+
138
174
- name : Upload coverage data
139
-
175
+
140
176
with :
141
177
name : coverage-data
142
178
path : " .coverage.*"
@@ -145,11 +181,12 @@ jobs:
145
181
runs-on : ubuntu-latest
146
182
needs : tests
147
183
steps :
184
+
148
185
- name : Check out the repository
149
- uses : actions/checkout@v3.2.0
186
+ uses : actions/checkout@v3.5.3
150
187
151
188
- name : Set up Python 3.11
152
- uses : actions/setup-python@v4.3 .1
189
+ uses : actions/setup-python@v4.6 .1
153
190
with :
154
191
python-version : ' 3.11'
155
192
@@ -158,18 +195,29 @@ jobs:
158
195
pip install --constraint=.github/constraints.txt pip
159
196
pip --version
160
197
198
+ - name : Load poetry cache
199
+ id : cached-poetry-dependencies
200
+
201
+ with :
202
+ path : |
203
+ .cache/pypoetry
204
+ key : poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
205
+
161
206
- name : Install Poetry
162
207
run : |
163
208
pip install --constraint=.github/constraints.txt poetry
164
209
poetry --version
210
+ poetry config --local cache-dir .cache/pypoetry
211
+ poetry config --local virtualenvs.create false
212
+ poetry env info
165
213
166
214
- name : Install Nox
167
215
run : |
168
216
pip install --constraint=.github/constraints.txt nox
169
217
nox --version
170
218
171
219
- name : Download coverage data
172
-
220
+
173
221
with :
174
222
name : coverage-data
175
223
@@ -182,4 +230,4 @@ jobs:
182
230
nox --force-color --session=coverage -- xml
183
231
184
232
- name : Upload coverage report
185
-
233
+
0 commit comments