Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into input_annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c committed Nov 13, 2023
2 parents 5466f95 + 4337bee commit 95def37
Show file tree
Hide file tree
Showing 411 changed files with 3,901 additions and 9,239 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ exclude_lines =
pragma: no cover
raise NotImplementedError
if __name__ == .__main__.:
if TYPE_CHECKING:
ignore_errors = True
omit =
tests/*
8 changes: 8 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[flake8]
ignore = E203,W503
max-line-length = 100
select = B,C,E,F,W,T4
exclude = cwltool/schemas
extend-ignore = E501,B905
# when Python 3.10 is the minimum version, re-enable check B905 for zip + strict
extend-select = B9
8 changes: 8 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# isort
46e0485a889453dc178a878b5b5ebbfc7e4eb5f1

# upgrade to black 20.8b1
6fd6fdb381fe3f347627fd517a8f2dba7b0a7029

# upgrade to black 23.1, longer lines (100)
7fe8c0739b0515d00daabc7db87bc5fad926d345
156 changes: 105 additions & 51 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Continuous integration tests
name: CI Tests

on:
push:
Expand All @@ -12,48 +12,53 @@ concurrency:
cancel-in-progress: true

env:
singularity_version: 3.8.3
TOX_SKIP_MISSING_INTERPRETERS: False
# Rich (pip)
FORCE_COLOR: 1
# Tox
PY_COLORS: 1
# Mypy (see https://github.com/python/mypy/issues/7771)
TERM: xterm-color
MYPY_FORCE_COLOR: 1
MYPY_FORCE_TERMINAL_WIDTH: 200
# Pytest
PYTEST_ADDOPTS: --color=yes

jobs:

tox:
name: CI tests via Tox

runs-on: ubuntu-20.04 # 22.04 doesn't support Python 3.6

name: Tox
runs-on: ubuntu-22.04
strategy:
matrix:
py-ver-major: [3]
py-ver-minor: [6, 7, 8, 9, 10, 11]
py-ver-minor: [8, 9, 10, 11, 12]
step: [lint, unit, bandit, mypy]
exclude:
- py-ver-major: 3
py-ver-minor: 6
step: mypy

env:
py-semver: ${{ format('{0}.{1}', matrix.py-ver-major, matrix.py-ver-minor) }}
TOXENV: ${{ format('py{0}{1}-{2}', matrix.py-ver-major, matrix.py-ver-minor, matrix.step) }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Singularity
if: ${{ matrix.step == 'unit' || matrix.step == 'mypy' }}
uses: eWaterCycle/setup-singularity@v7
with:
singularity-version: ${{ env.singularity_version }}
run: |
wget --no-verbose https://github.com/sylabs/singularity/releases/download/v3.10.4/singularity-ce_3.10.4-focal_amd64.deb
sudo apt-get install -y ./singularity-ce_3.10.4-focal_amd64.deb
- name: Give the test runner user a name to make provenance happy.
if: ${{ matrix.step == 'unit' || matrix.step == 'mypy' }}
run: sudo usermod -c 'CI Runner' $(whoami)
run: sudo usermod -c 'CI Runner' "$(whoami)"

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.py-semver }}
allow-prereleases: true
cache: pip
cache-dependency-path: |
requirements.txt
Expand All @@ -62,7 +67,7 @@ jobs:
- name: Upgrade setuptools and install tox
run: |
pip install -U pip setuptools wheel
pip install tox tox-gh-actions
pip install "tox<4" "tox-gh-actions<3"
- name: MyPy cache
if: ${{ matrix.step == 'mypy' }}
Expand All @@ -78,24 +83,23 @@ jobs:
if: ${{ matrix.step == 'unit' }}
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}

tox-style:
name: CI linters via Tox

name: Linters
runs-on: ubuntu-20.04

strategy:
matrix:
step: [lintreadme, shellcheck, pydocstyle]

env:
py-semver: "3.11"
TOXENV: ${{ format('py311-{0}', matrix.step) }}
py-semver: "3.12"
TOXENV: ${{ format('py312-{0}', matrix.step) }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -108,7 +112,7 @@ jobs:
- name: Upgrade setuptools and install tox
run: |
pip install -U pip setuptools wheel
pip install tox tox-gh-actions
pip install "tox<4" "tox-gh-actions<3"
- if: ${{ matrix.step == 'pydocstyle' && github.event_name == 'pull_request'}}
name: Create local branch for diff-quality for PRs
Expand All @@ -117,10 +121,47 @@ jobs:
- name: Test with tox
run: tox

conformance_tests:
name: CWL spec conformance tests
clean_working_dir:
name: No leftovers
runs-on: ubuntu-22.04
env:
py-semver: "3.12"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Singularity
run: |
wget --no-verbose https://github.com/sylabs/singularity/releases/download/v3.10.4/singularity-ce_3.10.4-focal_amd64.deb
sudo apt-get install -y ./singularity-ce_3.10.4-focal_amd64.deb
- name: Give the test runner user a name to make provenance happy.
run: sudo usermod -c 'CI Runner' "$(whoami)"

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.py-semver }}
cache: pip

- name: install with test dependencies
run: |
pip install -U pip setuptools wheel
pip install --no-build-isolation -rtest-requirements.txt .[deps]
- name: make working directory read-only
run: |
mkdir .pytest_cache
chmod a-w .
- name: run tests
run: make test

runs-on: ubuntu-20.04

conformance_tests:
name: CWL conformance
runs-on: ubuntu-22.04

strategy:
matrix:
Expand All @@ -133,13 +174,20 @@ jobs:
extras: "--fast-parser"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Singularity
if: ${{ matrix.container == 'singularity' }}
uses: eWaterCycle/setup-singularity@v7
run: |
wget --no-verbose https://github.com/sylabs/singularity/releases/download/v3.10.4/singularity-ce_3.10.4-jammy_amd64.deb
sudo apt-get install -y ./singularity-ce_3.10.4-jammy_amd64.deb
- name: Singularity cache
if: ${{ matrix.container == 'singularity' }}
uses: actions/cache@v3
with:
singularity-version: ${{ env.singularity_version }}
path: sifcache
key: singularity

- name: Set up Podman
if: ${{ matrix.container == 'podman' }}
Expand All @@ -148,41 +196,44 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: 3.12
cache: pip

- name: Run CWL conformance tests ${{ matrix.cwl-version }}
- name: "Test CWL ${{ matrix.cwl-version }} conformance"
env:
version: ${{ matrix.cwl-version }}
container: ${{ matrix.container }}
spec_branch: main
VERSION: ${{ matrix.cwl-version }}
CONTAINER: ${{ matrix.container }}
GIT_TARGET: main
CWLTOOL_OPTIONS: ${{ matrix.extras }}
run: ./conformance-test.sh

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
release_test:
name: cwltool release test

runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Singularity
uses: eWaterCycle/setup-singularity@v7
with:
singularity-version: ${{ env.singularity_version }}
run: |
wget --no-verbose https://github.com/sylabs/singularity/releases/download/v3.10.4/singularity-ce_3.10.4-jammy_amd64.deb
sudo apt-get install -y ./singularity-ce_3.10.4-jammy_amd64.deb
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: 3.12
cache: pip
cache-dependency-path: |
requirements.txt
test-requirements.txt
- name: Give the test runner user a name to make provenance happy.
run: sudo usermod -c 'CI Runner' $(whoami)
run: sudo usermod -c 'CI Runner' "$(whoami)"

- name: Install packages
run: |
Expand All @@ -197,31 +248,35 @@ jobs:
build_test_container:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: record cwltool version
run: pip install -U setuptools wheel && pip install setuptools_scm[toml] && python setup.py --version
- name: build & test cwltool_module container
run: ./build-cwltool-docker.sh

macos:
name: CI test on macos-latest
name: Test on macos-latest
runs-on: macos-latest
env:
TOXENV: py310-unit
TOXENV: py312-unit
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: 3.12
cache: pip
cache-dependency-path: |
requirements.txt
tox.ini
- name: Upgrade setuptools and install tox
run: |
pip install -U pip setuptools wheel
pip install tox tox-gh-actions
pip install "tox<4" "tox-gh-actions<3"
# # docker for mac install is not currently stable
# - name: 'SETUP MacOS: load Homebrew cache'
# uses: actions/cache@v3
Expand All @@ -236,8 +291,7 @@ jobs:
- name: Test with tox
run: tox
- name: Upload coverage to Codecov
if: ${{ matrix.step == 'unit' }}
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
Loading

0 comments on commit 95def37

Please sign in to comment.