From 260df857c8a4d3afce933eb3351dd28dd924b867 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Thu, 29 Sep 2022 13:35:10 +0200 Subject: [PATCH] test with Python 3.11 --- .github/workflows/ci-tests.yml | 17 ++++++-- setup.py | 1 + tox.ini | 79 +++++++++++++++++----------------- 3 files changed, 55 insertions(+), 42 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index b98e3efba..f784e4e88 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -19,12 +19,12 @@ jobs: tox: name: CI tests via Tox - runs-on: ubuntu-20.04 + runs-on: ubuntu-20.04 # 22.04 doesn't support Python 3.6 strategy: matrix: py-ver-major: [3] - py-ver-minor: [6, 7, 8, 9, 10] + py-ver-minor: [6, 7, 8, 9, 10, 11] step: [lint, unit, bandit, mypy] exclude: - py-ver-major: 3 @@ -51,6 +51,7 @@ jobs: run: sudo usermod -c 'CI Runner' $(whoami) - name: Set up Python + if: matrix.py-ver-minor != 11 uses: actions/setup-python@v4 with: python-version: ${{ env.py-semver }} @@ -59,6 +60,16 @@ jobs: requirements.txt tox.ini + - name: Set up Python 3.11.0-rc.2 + if: matrix.py-ver-minor == 11 + uses: actions/setup-python@v4 + with: + python-version: 3.11.0-rc.2 + cache: pip + cache-dependency-path: | + requirements.txt + tox.ini + - name: Upgrade setuptools and install tox run: | pip install -U pip setuptools wheel @@ -156,7 +167,7 @@ jobs: release_test: name: cwltool release test - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 diff --git a/setup.py b/setup.py index ee681a234..b52537a3f 100644 --- a/setup.py +++ b/setup.py @@ -157,6 +157,7 @@ "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Bio-Informatics", "Topic :: Scientific/Engineering :: Astronomy", diff --git a/tox.ini b/tox.ini index 19cd62e78..03f76788f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,12 +1,12 @@ [tox] envlist = - py3{6,7,8,9,10}-lint - py3{6,7,8,9,10}-unit - py3{6,7,8,9,10}-bandit - py3{7,8,9,10}-mypy - py39-lintreadme - py39-shellcheck - py39-pydocstyle + py3{6,7,8,9,10,11}-lint + py3{6,7,8,9,10,11}-unit + py3{6,7,8,9,10,11}-bandit + py3{7,8,9,10,11}-mypy + py310-lintreadme + py310-shellcheck + py310-pydocstyle skip_missing_interpreters = True @@ -21,19 +21,20 @@ python = 3.8: py38 3.9: py39 3.10: py310 + 3.11: py311 [testenv] skipsdist = - py3{6,7,8,9,10}-!{unit,mypy,lintreadme} = True + py3{6,7,8,9,10,11}-!{unit,mypy,lintreadme} = True description = - py3{6,7,8,9,10}-unit: Run the unit tests - py3{6,7,8,9,10}-lint: Lint the Python code - py3{6,7,8,9,10}-bandit: Search for common security issues - py3{7,8,9,10}-mypy: Check for type safety - py39-pydocstyle: docstring style checker - py39-shellcheck: syntax check for shell scripts - py39-lintreadme: Lint the README.rst→.md conversion + py3{6,7,8,9,10,11}-unit: Run the unit tests + py3{6,7,8,9,10,11}-lint: Lint the Python code + py3{6,7,8,9,10,11}-bandit: Search for common security issues + py3{7,8,9,10,11}-mypy: Check for type safety + py310-pydocstyle: docstring style checker + py310-shellcheck: syntax check for shell scripts + py310-lintreadme: Lint the README.rst→.md conversion passenv = CI @@ -41,40 +42,40 @@ passenv = PROOT_NO_SECCOMP extras = - py3{6,7,8,9,10}-unit: deps + py3{6,7,8,9,10,11}-unit: deps deps = - py3{6,7,8,9,10}-{unit,lint,bandit,mypy}: -rrequirements.txt - py3{6,7,8,9,10}-{unit,mypy}: -rtest-requirements.txt - py3{6,7,8,9,10}-lint: -rlint-requirements.txt - py3{6,7,8,9,10}-bandit: bandit - py3{6,7,8,9,10}-bandit: importlib_metadata != 4.8.0 - py3{7,8,9,10}-mypy: -rmypy-requirements.txt - py39-pydocstyle: pydocstyle - py39-pydocstyle: diff-cover - py39-lintreadme: twine - py39-lintreadme: wheel - py39-lintreadme: readme_renderer[md] + py3{6,7,8,9,10,11}-{unit,lint,bandit,mypy}: -rrequirements.txt + py3{6,7,8,9,10,11}-{unit,mypy}: -rtest-requirements.txt + py3{6,7,8,9,10,11}-lint: -rlint-requirements.txt + py3{6,7,8,9,10,11}-bandit: bandit + py3{6,7,8,9,10,11}-bandit: importlib_metadata != 4.8.0 + py3{7,8,9,10,11}-mypy: -rmypy-requirements.txt + py310-pydocstyle: pydocstyle + py310-pydocstyle: diff-cover + py310-lintreadme: twine + py310-lintreadme: wheel + py310-lintreadme: readme_renderer[md] setenv = - py3{6,7,8,9,10}-unit: LC_ALL = C.UTF-8 + py3{6,7,8,9,10,11}-unit: LC_ALL = C.UTF-8 commands_pre = - py3{6,7,8,9,10}-unit: python -m pip install -U pip setuptools wheel - py39-lintreadme: python setup.py sdist --dist-dir {distdir} - py39-lintreadme: python setup.py bdist_wheel --dist-dir {distdir} + py3{6,7,8,9,10,11}-unit: python -m pip install -U pip setuptools wheel + py310-lintreadme: python setup.py sdist --dist-dir {distdir} + py310-lintreadme: python setup.py bdist_wheel --dist-dir {distdir} commands = - py3{6,7,8,9,10}-unit: make coverage-report coverage.xml PYTEST_EXTRA={posargs} - py3{6,7,8,9,10}-bandit: bandit -r cwltool - py3{6,7,8,9,10}-lint: make flake8 format-check codespell - py3{7,8,9,10}-mypy: make mypy mypyc PYTEST_EXTRA={posargs} + py3{6,7,8,9,10,11}-unit: make coverage-report coverage.xml PYTEST_EXTRA={posargs} + py3{6,7,8,9,10,11}-bandit: bandit -r cwltool + py3{6,7,8,9,10,11}-lint: make flake8 format-check codespell + py3{7,8,9,10,11}-mypy: make mypy mypyc PYTEST_EXTRA={posargs} py37-mypy: make mypy_3.6 - py39-shellcheck: make shellcheck - py39-pydocstyle: make diff_pydocstyle_report - py39-lintreadme: twine check {distdir}/* + py310-shellcheck: make shellcheck + py310-pydocstyle: make diff_pydocstyle_report + py310-lintreadme: twine check {distdir}/* skip_install = - py3{6,7,8,9,10}-{bandit,lint,mypy,shellcheck,pydocstyle,lintreadme}: true + py3{6,7,8,9,10,11}-{bandit,lint,mypy,shellcheck,pydocstyle,lintreadme}: true allowlist_externals = make