1- name : Continuous integration tests
1+ name : CI Tests
22
33on :
44 push :
@@ -12,20 +12,35 @@ 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
23-
30+ name : Tox
31+ runs-on : ubuntu-20.04 # 22.04 doesn't support Python 3.6
2432 strategy :
2533 matrix :
2634 py-ver-major : [3]
27- py-ver-minor : [6, 7, 8, 9, 10]
35+ py-ver-minor : [6, 7, 8, 9, 10, 11 ]
2836 step : [lint, unit, bandit, mypy]
37+ exclude :
38+ - py-ver-major : 3
39+ py-ver-minor : 6
40+ step : mypy
41+ - py-ver-major : 3
42+ py-ver-minor : 6
43+ step : lint
2944
3045 env :
3146 py-semver : ${{ format('{0}.{1}', matrix.py-ver-major, matrix.py-ver-minor) }}
@@ -38,13 +53,13 @@ jobs:
3853
3954 - name : Set up Singularity
4055 if : ${{ matrix.step == 'unit' || matrix.step == 'mypy' }}
41- uses : eWaterCycle/setup-singularity@v7
42- with :
43- singularity-version : ${{ env.singularity_version }}
56+ run : |
57+ wget --no-verbose https://github.com/sylabs/singularity/releases/download/v3.10.4/singularity-ce_3.10.4-focal_amd64.deb
58+ sudo apt-get install -y ./singularity-ce_3.10.4-focal_amd64.deb
4459
4560 - name : Give the test runner user a name to make provenance happy.
4661 if : ${{ matrix.step == 'unit' || matrix.step == 'mypy' }}
47- run : sudo usermod -c 'CI Runner' $(whoami)
62+ run : sudo usermod -c 'CI Runner' " $(whoami)"
4863
4964 - name : Set up Python
5065 uses : actions/setup-python@v4
5873 - name : Upgrade setuptools and install tox
5974 run : |
6075 pip install -U pip setuptools wheel
61- pip install tox tox-gh-actions
76+ pip install " tox<4" " tox-gh-actions<3"
6277
6378 - name : MyPy cache
6479 if : ${{ matrix.step == 'mypy' }}
@@ -75,19 +90,19 @@ jobs:
7590 uses : codecov/codecov-action@v3
7691 with :
7792 fail_ci_if_error : true
93+ token : ${{ secrets.CODECOV_TOKEN }}
7894
7995 tox-style :
80- name : CI linters via Tox
81-
96+ name : Linters
8297 runs-on : ubuntu-20.04
8398
8499 strategy :
85100 matrix :
86101 step : [lintreadme, shellcheck, pydocstyle]
87102
88103 env :
89- py-semver : " 3.10 "
90- TOXENV : ${{ format('py310 -{0}', matrix.step) }}
104+ py-semver : " 3.11 "
105+ TOXENV : ${{ format('py311 -{0}', matrix.step) }}
91106
92107 steps :
93108 - uses : actions/checkout@v3
@@ -103,7 +118,7 @@ jobs:
103118 - name : Upgrade setuptools and install tox
104119 run : |
105120 pip install -U pip setuptools wheel
106- pip install tox tox-gh-actions
121+ pip install " tox<4" " tox-gh-actions<3"
107122
108123 - if : ${{ matrix.step == 'pydocstyle' && github.event_name == 'pull_request'}}
109124 name : Create local branch for diff-quality for PRs
@@ -112,61 +127,119 @@ jobs:
112127 - name : Test with tox
113128 run : tox
114129
115- conformance_tests :
116- name : CWL spec conformance tests
130+ clean_working_dir :
131+ name : No leftovers
132+ runs-on : ubuntu-22.04
133+ env :
134+ py-semver : " 3.11"
135+ steps :
136+ - uses : actions/checkout@v3
137+ with :
138+ fetch-depth : 0
117139
118- runs-on : ubuntu-20.04
140+ - name : Set up Singularity
141+ run : |
142+ wget --no-verbose https://github.com/sylabs/singularity/releases/download/v3.10.4/singularity-ce_3.10.4-focal_amd64.deb
143+ sudo apt-get install -y ./singularity-ce_3.10.4-focal_amd64.deb
144+
145+ - name : Give the test runner user a name to make provenance happy.
146+ run : sudo usermod -c 'CI Runner' "$(whoami)"
147+
148+ - name : Set up Python
149+ uses : actions/setup-python@v4
150+ with :
151+ python-version : ${{ env.py-semver }}
152+ cache : pip
153+
154+ - name : install with test dependencies
155+ run : |
156+ pip install -U pip setuptools wheel
157+ pip install --no-build-isolation -rtest-requirements.txt .[deps]
158+
159+ - name : make working directory read-only
160+ run : |
161+ mkdir .pytest_cache
162+ chmod a-w .
163+
164+ - name : run tests
165+ run : make test
166+
167+
168+ conformance_tests :
169+ name : CWL conformance
170+ runs-on : ubuntu-22.04
119171
120172 strategy :
121173 matrix :
122174 cwl-version : [v1.0, v1.1, v1.2]
123175 container : [docker, singularity, podman]
176+ extras : [""]
177+ include :
178+ - cwl-version : v1.2
179+ container : docker
180+ extras : " --fast-parser"
124181
125182 steps :
126183 - uses : actions/checkout@v3
127184
128185 - name : Set up Singularity
129- uses : eWaterCycle/setup-singularity@v7
186+ if : ${{ matrix.container == 'singularity' }}
187+ run : |
188+ wget --no-verbose https://github.com/sylabs/singularity/releases/download/v3.10.4/singularity-ce_3.10.4-jammy_amd64.deb
189+ sudo apt-get install -y ./singularity-ce_3.10.4-jammy_amd64.deb
190+
191+ - name : Singularity cache
192+ if : ${{ matrix.container == 'singularity' }}
193+ uses : actions/cache@v3
130194 with :
131- singularity-version : ${{ env.singularity_version }}
195+ path : sifcache
196+ key : singularity
197+
198+ - name : Set up Podman
199+ if : ${{ matrix.container == 'podman' }}
200+ run : sudo rm -f /usr/bin/docker ; sudo apt-get install -y podman
132201
133202 - name : Set up Python
134203 uses : actions/setup-python@v4
135204 with :
136- python-version : 3.9
205+ python-version : 3.11
137206 cache : pip
138207
139- - name : Run CWL conformance tests ${{ matrix.cwl-version }}
208+ - name : " Test CWL ${{ matrix.cwl-version }} conformance "
140209 env :
141- version : ${{ matrix.cwl-version }}
142- container : ${{ matrix.container }}
143- spec_branch : main
210+ VERSION : ${{ matrix.cwl-version }}
211+ CONTAINER : ${{ matrix.container }}
212+ GIT_TARGET : main
213+ CWLTOOL_OPTIONS : ${{ matrix.extras }}
144214 run : ./conformance-test.sh
145-
215+ - name : Upload coverage to Codecov
216+ uses : codecov/codecov-action@v3
217+ with :
218+ fail_ci_if_error : true
219+ token : ${{ secrets.CODECOV_TOKEN }}
146220 release_test :
147221 name : cwltool release test
148-
149- runs-on : ubuntu-20.04
222+ runs-on : ubuntu-22.04
150223
151224 steps :
152225 - uses : actions/checkout@v3
153226
154227 - name : Set up Singularity
155- uses : eWaterCycle/setup-singularity@v7
156- with :
157- singularity-version : ${{ env.singularity_version }}
228+ run : |
229+ wget --no-verbose https://github.com/sylabs/singularity/releases/download/v3.10.4/singularity-ce_3.10.4-jammy_amd64.deb
230+ sudo apt-get install -y ./singularity-ce_3.10.4-jammy_amd64.deb
158231
159232 - name : Set up Python
160233 uses : actions/setup-python@v4
161234 with :
162- python-version : " 3.10 " # quoted, otherwise that turns into the number 3.1
235+ python-version : 3.11
163236 cache : pip
164237 cache-dependency-path : |
165238 requirements.txt
166239 test-requirements.txt
167240
168241 - name : Give the test runner user a name to make provenance happy.
169- run : sudo usermod -c 'CI Runner' $(whoami)
242+ run : sudo usermod -c 'CI Runner' " $(whoami)"
170243
171244 - name : Install packages
172245 run : |
@@ -177,3 +250,50 @@ jobs:
177250 env :
178251 RELEASE_SKIP : head
179252 run : ./release-test.sh
253+
254+ build_test_container :
255+ runs-on : ubuntu-latest
256+ steps :
257+ - uses : actions/checkout@v3
258+ - name : build & test cwltool_module container
259+ run : ./build-cwltool-docker.sh
260+
261+ macos :
262+ name : Test on macos-latest
263+ runs-on : macos-latest
264+ env :
265+ TOXENV : py311-unit
266+ steps :
267+ - uses : actions/checkout@v3
268+ with :
269+ fetch-depth : 0
270+ - name : Set up Python
271+ uses : actions/setup-python@v4
272+ with :
273+ python-version : 3.11
274+ cache : pip
275+ cache-dependency-path : |
276+ requirements.txt
277+ tox.ini
278+ - name : Upgrade setuptools and install tox
279+ run : |
280+ pip install -U pip setuptools wheel
281+ pip install "tox<4" "tox-gh-actions<3"
282+ # # docker for mac install is not currently stable
283+ # - name: 'SETUP MacOS: load Homebrew cache'
284+ # uses: actions/cache@v3
285+ # if: runner.os == 'macOS'
286+ # with:
287+ # path: |
288+ # ~/Library/Caches/Homebrew/downloads/*--Docker.dmg
289+ # key: brew-actions-setup-docker-1.0.11
290+ # restore-keys: brew-actions-setup-docker-
291+ # - name: setup docker on macos (default stable version)
292+ # uses: docker-practice/actions-setup-docker@master
293+ - name : Test with tox
294+ run : tox
295+ - name : Upload coverage to Codecov
296+ uses : codecov/codecov-action@v3
297+ with :
298+ fail_ci_if_error : true
299+ token : ${{ secrets.CODECOV_TOKEN }}
0 commit comments