1- name : Continuous integration tests
1+ name : CI Tests
22
33on :
44 push :
@@ -12,48 +12,53 @@ concurrency:
1212 cancel-in-progress : true
1313
1414env :
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
1626
1727jobs :
1828
1929 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
2432 strategy :
2533 matrix :
2634 py-ver-major : [3]
27- py-ver-minor : [6, 7, 8, 9, 10, 11]
35+ py-ver-minor : [8, 9, 10, 11, 12 ]
2836 step : [lint, unit, bandit, mypy]
29- exclude :
30- - py-ver-major : 3
31- py-ver-minor : 6
32- step : mypy
3337
3438 env :
3539 py-semver : ${{ format('{0}.{1}', matrix.py-ver-major, matrix.py-ver-minor) }}
3640 TOXENV : ${{ format('py{0}{1}-{2}', matrix.py-ver-major, matrix.py-ver-minor, matrix.step) }}
3741
3842 steps :
39- - uses : actions/checkout@v3
43+ - uses : actions/checkout@v4
4044 with :
4145 fetch-depth : 0
4246
4347 - name : Set up Singularity
4448 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
4852
4953 - name : Give the test runner user a name to make provenance happy.
5054 if : ${{ matrix.step == 'unit' || matrix.step == 'mypy' }}
51- run : sudo usermod -c 'CI Runner' $(whoami)
55+ run : sudo usermod -c 'CI Runner' " $(whoami)"
5256
5357 - name : Set up Python
5458 uses : actions/setup-python@v4
5559 with :
5660 python-version : ${{ env.py-semver }}
61+ allow-prereleases : true
5762 cache : pip
5863 cache-dependency-path : |
5964 requirements.txt
6267 - name : Upgrade setuptools and install tox
6368 run : |
6469 pip install -U pip setuptools wheel
65- pip install tox tox-gh-actions
70+ pip install " tox<4" " tox-gh-actions<3"
6671
6772 - name : MyPy cache
6873 if : ${{ matrix.step == 'mypy' }}
@@ -78,24 +83,23 @@ jobs:
7883 if : ${{ matrix.step == 'unit' }}
7984 uses : codecov/codecov-action@v3
8085 with :
81- fail_ci_if_error : true
86+ fail_ci_if_error : false
8287 token : ${{ secrets.CODECOV_TOKEN }}
8388
8489 tox-style :
85- name : CI linters via Tox
86-
90+ name : Linters
8791 runs-on : ubuntu-20.04
8892
8993 strategy :
9094 matrix :
9195 step : [lintreadme, shellcheck, pydocstyle]
9296
9397 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) }}
96100
97101 steps :
98- - uses : actions/checkout@v3
102+ - uses : actions/checkout@v4
99103 with :
100104 fetch-depth : 0
101105
@@ -108,7 +112,7 @@ jobs:
108112 - name : Upgrade setuptools and install tox
109113 run : |
110114 pip install -U pip setuptools wheel
111- pip install tox tox-gh-actions
115+ pip install " tox<4" " tox-gh-actions<3"
112116
113117 - if : ${{ matrix.step == 'pydocstyle' && github.event_name == 'pull_request'}}
114118 name : Create local branch for diff-quality for PRs
@@ -117,10 +121,47 @@ jobs:
117121 - name : Test with tox
118122 run : tox
119123
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
122160
123- runs-on : ubuntu-20.04
161+
162+ conformance_tests :
163+ name : CWL conformance
164+ runs-on : ubuntu-22.04
124165
125166 strategy :
126167 matrix :
@@ -133,13 +174,20 @@ jobs:
133174 extras : " --fast-parser"
134175
135176 steps :
136- - uses : actions/checkout@v3
177+ - uses : actions/checkout@v4
137178
138179 - name : Set up Singularity
139180 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
141188 with :
142- singularity-version : ${{ env.singularity_version }}
189+ path : sifcache
190+ key : singularity
143191
144192 - name : Set up Podman
145193 if : ${{ matrix.container == 'podman' }}
@@ -148,41 +196,44 @@ jobs:
148196 - name : Set up Python
149197 uses : actions/setup-python@v4
150198 with :
151- python-version : 3.9
199+ python-version : 3.12
152200 cache : pip
153201
154- - name : Run CWL conformance tests ${{ matrix.cwl-version }}
202+ - name : " Test CWL ${{ matrix.cwl-version }} conformance "
155203 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
159207 CWLTOOL_OPTIONS : ${{ matrix.extras }}
160208 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 }}
162214 release_test :
163215 name : cwltool release test
164-
165216 runs-on : ubuntu-22.04
166217
167218 steps :
168- - uses : actions/checkout@v3
219+ - uses : actions/checkout@v4
169220
170221 - 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
174225
175226 - name : Set up Python
176227 uses : actions/setup-python@v4
177228 with :
178- python-version : 3.11
229+ python-version : 3.12
179230 cache : pip
180231 cache-dependency-path : |
181232 requirements.txt
182233 test-requirements.txt
183234
184235 - 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)"
186237
187238 - name : Install packages
188239 run : |
@@ -197,31 +248,35 @@ jobs:
197248 build_test_container :
198249 runs-on : ubuntu-latest
199250 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
201256 - name : build & test cwltool_module container
202257 run : ./build-cwltool-docker.sh
203258
204259 macos :
205- name : CI test on macos-latest
260+ name : Test on macos-latest
206261 runs-on : macos-latest
207262 env :
208- TOXENV : py310 -unit
263+ TOXENV : py312 -unit
209264 steps :
210- - uses : actions/checkout@v3
265+ - uses : actions/checkout@v4
211266 with :
212267 fetch-depth : 0
213268 - name : Set up Python
214269 uses : actions/setup-python@v4
215270 with :
216- python-version : 3.11
271+ python-version : 3.12
217272 cache : pip
218273 cache-dependency-path : |
219274 requirements.txt
220275 tox.ini
221276 - name : Upgrade setuptools and install tox
222277 run : |
223278 pip install -U pip setuptools wheel
224- pip install tox tox-gh-actions
279+ pip install " tox<4" " tox-gh-actions<3"
225280 # # docker for mac install is not currently stable
226281 # - name: 'SETUP MacOS: load Homebrew cache'
227282 # uses: actions/cache@v3
@@ -236,8 +291,7 @@ jobs:
236291 - name : Test with tox
237292 run : tox
238293 - name : Upload coverage to Codecov
239- if : ${{ matrix.step == 'unit' }}
240294 uses : codecov/codecov-action@v3
241295 with :
242- fail_ci_if_error : true
296+ fail_ci_if_error : false
243297 token : ${{ secrets.CODECOV_TOKEN }}
0 commit comments