1
- name : Continuous integration tests
1
+ name : CI Tests
2
2
3
3
on :
4
4
push :
@@ -12,48 +12,53 @@ concurrency:
12
12
cancel-in-progress : true
13
13
14
14
env :
15
- singularity_version : 3.8.3
15
+ TOX_SKIP_MISSING_INTERPRETERS : False
16
+ # Rich (pip)
17
+ FORCE_COLOR : 1
18
+ # Tox
19
+ PY_COLORS : 1
20
+ # Mypy (see https://github.com/python/mypy/issues/7771)
21
+ TERM : xterm-color
22
+ MYPY_FORCE_COLOR : 1
23
+ MYPY_FORCE_TERMINAL_WIDTH : 200
24
+ # Pytest
25
+ PYTEST_ADDOPTS : --color=yes
16
26
17
27
jobs :
18
28
19
29
tox :
20
- name : CI tests via Tox
21
-
22
- runs-on : ubuntu-20.04 # 22.04 doesn't support Python 3.6
23
-
30
+ name : Tox
31
+ runs-on : ubuntu-22.04
24
32
strategy :
25
33
matrix :
26
34
py-ver-major : [3]
27
- py-ver-minor : [6, 7, 8, 9, 10, 11]
35
+ py-ver-minor : [8, 9, 10, 11, 12 ]
28
36
step : [lint, unit, bandit, mypy]
29
- exclude :
30
- - py-ver-major : 3
31
- py-ver-minor : 6
32
- step : mypy
33
37
34
38
env :
35
39
py-semver : ${{ format('{0}.{1}', matrix.py-ver-major, matrix.py-ver-minor) }}
36
40
TOXENV : ${{ format('py{0}{1}-{2}', matrix.py-ver-major, matrix.py-ver-minor, matrix.step) }}
37
41
38
42
steps :
39
- - uses : actions/checkout@v3
43
+ - uses : actions/checkout@v4
40
44
with :
41
45
fetch-depth : 0
42
46
43
47
- name : Set up Singularity
44
48
if : ${{ matrix.step == 'unit' || matrix.step == 'mypy' }}
45
- uses : eWaterCycle/setup-singularity@v7
46
- with :
47
- singularity-version : ${{ env.singularity_version }}
49
+ run : |
50
+ wget --no-verbose https://github.com/sylabs/singularity/releases/download/v3.10.4/singularity-ce_3.10.4-focal_amd64.deb
51
+ sudo apt-get install -y ./singularity-ce_3.10.4-focal_amd64.deb
48
52
49
53
- name : Give the test runner user a name to make provenance happy.
50
54
if : ${{ matrix.step == 'unit' || matrix.step == 'mypy' }}
51
- run : sudo usermod -c 'CI Runner' $(whoami)
55
+ run : sudo usermod -c 'CI Runner' " $(whoami)"
52
56
53
57
- name : Set up Python
54
58
uses : actions/setup-python@v4
55
59
with :
56
60
python-version : ${{ env.py-semver }}
61
+ allow-prereleases : true
57
62
cache : pip
58
63
cache-dependency-path : |
59
64
requirements.txt
62
67
- name : Upgrade setuptools and install tox
63
68
run : |
64
69
pip install -U pip setuptools wheel
65
- pip install tox tox-gh-actions
70
+ pip install " tox<4" " tox-gh-actions<3"
66
71
67
72
- name : MyPy cache
68
73
if : ${{ matrix.step == 'mypy' }}
@@ -78,24 +83,23 @@ jobs:
78
83
if : ${{ matrix.step == 'unit' }}
79
84
uses : codecov/codecov-action@v3
80
85
with :
81
- fail_ci_if_error : true
86
+ fail_ci_if_error : false
82
87
token : ${{ secrets.CODECOV_TOKEN }}
83
88
84
89
tox-style :
85
- name : CI linters via Tox
86
-
90
+ name : Linters
87
91
runs-on : ubuntu-20.04
88
92
89
93
strategy :
90
94
matrix :
91
95
step : [lintreadme, shellcheck, pydocstyle]
92
96
93
97
env :
94
- py-semver : " 3.11 "
95
- TOXENV : ${{ format('py311 -{0}', matrix.step) }}
98
+ py-semver : " 3.12 "
99
+ TOXENV : ${{ format('py312 -{0}', matrix.step) }}
96
100
97
101
steps :
98
- - uses : actions/checkout@v3
102
+ - uses : actions/checkout@v4
99
103
with :
100
104
fetch-depth : 0
101
105
@@ -108,7 +112,7 @@ jobs:
108
112
- name : Upgrade setuptools and install tox
109
113
run : |
110
114
pip install -U pip setuptools wheel
111
- pip install tox tox-gh-actions
115
+ pip install " tox<4" " tox-gh-actions<3"
112
116
113
117
- if : ${{ matrix.step == 'pydocstyle' && github.event_name == 'pull_request'}}
114
118
name : Create local branch for diff-quality for PRs
@@ -117,10 +121,47 @@ jobs:
117
121
- name : Test with tox
118
122
run : tox
119
123
120
- conformance_tests :
121
- name : CWL spec conformance tests
124
+ clean_working_dir :
125
+ name : No leftovers
126
+ runs-on : ubuntu-22.04
127
+ env :
128
+ py-semver : " 3.12"
129
+ steps :
130
+ - uses : actions/checkout@v4
131
+ with :
132
+ fetch-depth : 0
133
+
134
+ - name : Set up Singularity
135
+ run : |
136
+ wget --no-verbose https://github.com/sylabs/singularity/releases/download/v3.10.4/singularity-ce_3.10.4-focal_amd64.deb
137
+ sudo apt-get install -y ./singularity-ce_3.10.4-focal_amd64.deb
138
+
139
+ - name : Give the test runner user a name to make provenance happy.
140
+ run : sudo usermod -c 'CI Runner' "$(whoami)"
141
+
142
+ - name : Set up Python
143
+ uses : actions/setup-python@v4
144
+ with :
145
+ python-version : ${{ env.py-semver }}
146
+ cache : pip
147
+
148
+ - name : install with test dependencies
149
+ run : |
150
+ pip install -U pip setuptools wheel
151
+ pip install --no-build-isolation -rtest-requirements.txt .[deps]
152
+
153
+ - name : make working directory read-only
154
+ run : |
155
+ mkdir .pytest_cache
156
+ chmod a-w .
157
+
158
+ - name : run tests
159
+ run : make test
122
160
123
- runs-on : ubuntu-20.04
161
+
162
+ conformance_tests :
163
+ name : CWL conformance
164
+ runs-on : ubuntu-22.04
124
165
125
166
strategy :
126
167
matrix :
@@ -133,13 +174,20 @@ jobs:
133
174
extras : " --fast-parser"
134
175
135
176
steps :
136
- - uses : actions/checkout@v3
177
+ - uses : actions/checkout@v4
137
178
138
179
- name : Set up Singularity
139
180
if : ${{ matrix.container == 'singularity' }}
140
- uses : eWaterCycle/setup-singularity@v7
181
+ run : |
182
+ wget --no-verbose https://github.com/sylabs/singularity/releases/download/v3.10.4/singularity-ce_3.10.4-jammy_amd64.deb
183
+ sudo apt-get install -y ./singularity-ce_3.10.4-jammy_amd64.deb
184
+
185
+ - name : Singularity cache
186
+ if : ${{ matrix.container == 'singularity' }}
187
+ uses : actions/cache@v3
141
188
with :
142
- singularity-version : ${{ env.singularity_version }}
189
+ path : sifcache
190
+ key : singularity
143
191
144
192
- name : Set up Podman
145
193
if : ${{ matrix.container == 'podman' }}
@@ -148,41 +196,44 @@ jobs:
148
196
- name : Set up Python
149
197
uses : actions/setup-python@v4
150
198
with :
151
- python-version : 3.9
199
+ python-version : 3.12
152
200
cache : pip
153
201
154
- - name : Run CWL conformance tests ${{ matrix.cwl-version }}
202
+ - name : " Test CWL ${{ matrix.cwl-version }} conformance "
155
203
env :
156
- version : ${{ matrix.cwl-version }}
157
- container : ${{ matrix.container }}
158
- spec_branch : main
204
+ VERSION : ${{ matrix.cwl-version }}
205
+ CONTAINER : ${{ matrix.container }}
206
+ GIT_TARGET : main
159
207
CWLTOOL_OPTIONS : ${{ matrix.extras }}
160
208
run : ./conformance-test.sh
161
-
209
+ - name : Upload coverage to Codecov
210
+ uses : codecov/codecov-action@v3
211
+ with :
212
+ fail_ci_if_error : false
213
+ token : ${{ secrets.CODECOV_TOKEN }}
162
214
release_test :
163
215
name : cwltool release test
164
-
165
216
runs-on : ubuntu-22.04
166
217
167
218
steps :
168
- - uses : actions/checkout@v3
219
+ - uses : actions/checkout@v4
169
220
170
221
- name : Set up Singularity
171
- uses : eWaterCycle/setup-singularity@v7
172
- with :
173
- singularity-version : ${{ env.singularity_version }}
222
+ run : |
223
+ wget --no-verbose https://github.com/sylabs/singularity/releases/download/v3.10.4/singularity-ce_3.10.4-jammy_amd64.deb
224
+ sudo apt-get install -y ./singularity-ce_3.10.4-jammy_amd64.deb
174
225
175
226
- name : Set up Python
176
227
uses : actions/setup-python@v4
177
228
with :
178
- python-version : 3.11
229
+ python-version : 3.12
179
230
cache : pip
180
231
cache-dependency-path : |
181
232
requirements.txt
182
233
test-requirements.txt
183
234
184
235
- name : Give the test runner user a name to make provenance happy.
185
- run : sudo usermod -c 'CI Runner' $(whoami)
236
+ run : sudo usermod -c 'CI Runner' " $(whoami)"
186
237
187
238
- name : Install packages
188
239
run : |
@@ -197,31 +248,35 @@ jobs:
197
248
build_test_container :
198
249
runs-on : ubuntu-latest
199
250
steps :
200
- - uses : actions/checkout@v3
251
+ - uses : actions/checkout@v4
252
+ with :
253
+ fetch-depth : 0
254
+ - name : record cwltool version
255
+ run : pip install -U setuptools wheel && pip install setuptools_scm[toml] && python setup.py --version
201
256
- name : build & test cwltool_module container
202
257
run : ./build-cwltool-docker.sh
203
258
204
259
macos :
205
- name : CI test on macos-latest
260
+ name : Test on macos-latest
206
261
runs-on : macos-latest
207
262
env :
208
- TOXENV : py310 -unit
263
+ TOXENV : py312 -unit
209
264
steps :
210
- - uses : actions/checkout@v3
265
+ - uses : actions/checkout@v4
211
266
with :
212
267
fetch-depth : 0
213
268
- name : Set up Python
214
269
uses : actions/setup-python@v4
215
270
with :
216
- python-version : 3.11
271
+ python-version : 3.12
217
272
cache : pip
218
273
cache-dependency-path : |
219
274
requirements.txt
220
275
tox.ini
221
276
- name : Upgrade setuptools and install tox
222
277
run : |
223
278
pip install -U pip setuptools wheel
224
- pip install tox tox-gh-actions
279
+ pip install " tox<4" " tox-gh-actions<3"
225
280
# # docker for mac install is not currently stable
226
281
# - name: 'SETUP MacOS: load Homebrew cache'
227
282
# uses: actions/cache@v3
@@ -236,8 +291,7 @@ jobs:
236
291
- name : Test with tox
237
292
run : tox
238
293
- name : Upload coverage to Codecov
239
- if : ${{ matrix.step == 'unit' }}
240
294
uses : codecov/codecov-action@v3
241
295
with :
242
- fail_ci_if_error : true
296
+ fail_ci_if_error : false
243
297
token : ${{ secrets.CODECOV_TOKEN }}
0 commit comments