15
15
strategy :
16
16
fail-fast : false
17
17
matrix :
18
- python-version : ['2.7', ' 3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
18
+ python-version : ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
19
19
steps :
20
20
- name : Git checkout
21
21
uses : actions/checkout@v4
@@ -40,22 +40,18 @@ jobs:
40
40
env :
41
41
PLATFORM : lint
42
42
43
- build_and_test :
43
+ build_and_test_py3 :
44
44
runs-on : ubuntu-latest
45
45
strategy :
46
46
fail-fast : false
47
47
matrix :
48
- python-version : ['2.7', ' 3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
48
+ python-version : ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
49
49
plone-version : ['Plone52', 'Plone60', 'Plone61']
50
50
# While tox skips invalid matrix combinations, Github actions does
51
51
# schedule and fail jobs for these. So exclude them. We could also
52
52
# use include instead, but then the job names do not contain the
53
53
# Plone version.
54
54
exclude :
55
- - python-version : ' 2.7'
56
- plone-version : ' Plone60'
57
- - python-version : ' 2.7'
58
- plone-version : ' Plone61'
59
55
- python-version : ' 3.8'
60
56
plone-version : ' Plone60'
61
57
- python-version : ' 3.8'
@@ -128,10 +124,74 @@ jobs:
128
124
include-hidden-files : true
129
125
if-no-files-found : ignore
130
126
127
+ # https://github.com/actions/setup-python/issues/672#issuecomment-1589120020
128
+ build_and_test_py2 :
129
+ runs-on : ubuntu-20.04
130
+ container :
131
+ image : python:2.7.18-buster
132
+ strategy :
133
+ fail-fast : false
134
+ matrix :
135
+ python-version : ['2.7']
136
+ plone-version : ['Plone52']
137
+
138
+ steps :
139
+ - name : Git checkout
140
+ uses : actions/checkout@v4
141
+
142
+ - name : Set up Python ${{ matrix.python-version }}
143
+ uses : actions/setup-python@v5
144
+ with :
145
+ python-version : ${{ matrix.python-version }}
146
+
147
+ - name : Cache hash ${{ matrix.python-version }} - ${{ matrix.plone-version }}
148
+ uses : actions/cache@v4
149
+ with :
150
+ path : |
151
+ ~/.cache/pip
152
+ ~/buildout-cache
153
+ ~/extends
154
+ key : ${{ runner.os }}-tox-${{ matrix.python-version }}-${{ matrix.plone-version }}-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/*.cfg') }}-${{ hashFiles('**/constraints.txt') }}-${{ hashFiles('**/tox.ini') }}
155
+ # restore-keys: |
156
+ # ${{ runner.os }}-tox-
157
+
158
+ - name : Cache configure
159
+ run : |
160
+ mkdir -p ~/buildout-cache/{eggs,downloads}
161
+ mkdir ~/.buildout
162
+ echo "[buildout]" > $HOME/.buildout/default.cfg
163
+ echo "download-cache = $HOME/buildout-cache/downloads" >> $HOME/.buildout/default.cfg
164
+ echo "eggs-directory = $HOME/buildout-cache/eggs" >> $HOME/.buildout/default.cfg
165
+
166
+ - name : Install dependencies
167
+ run : |
168
+ python -m pip install --upgrade pip
169
+ pip install tox tox-gh-actions
170
+
171
+ # Unfortunately, this is always also run against python3.10 in
172
+ # addition to the specified python factor, if the plone version is
173
+ # supported on 3.10. Apparently that (base?) version is always
174
+ # available.
175
+ - name : Test with tox
176
+ run : |
177
+ tox -r
178
+ env :
179
+ PLONE_VERSION : ${{ matrix.plone-version }}
180
+
181
+ # Coverage, based on https://hynek.me/articles/ditch-codecov-python/
182
+
183
+ - name : Upload coverage data
184
+ uses : actions/upload-artifact@v4
185
+ with :
186
+ name : coverage-data-${{ matrix.python-version }}-${{ matrix.plone-version }}
187
+ path : .coverage.*
188
+ include-hidden-files : true
189
+ if-no-files-found : ignore
190
+
131
191
coverage :
132
192
name : Combine & check coverage
133
193
if : always()
134
- needs : build_and_test
194
+ needs : build_and_test_py3
135
195
runs-on : ubuntu-latest
136
196
137
197
steps :
0 commit comments