From 76125a639f584940b717eed6079ffe6813bb87f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Mon, 25 Jul 2022 18:59:49 -0700 Subject: [PATCH] Check 3.11 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bernát Gábor --- .github/workflows/check.yml | 29 ++++++++++++----------------- tox.ini | 3 ++- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index f8025ca35..c39f3c4d8 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -19,9 +19,10 @@ jobs: fail-fast: false matrix: py: + - "3.11.0-beta.4" + - "pypy-3.7-v7.3.9" # ahead to start it earlier because takes longer + - "pypy-2.7-v7.3.9" # ahead to start it earlier because takes longer - "3.10" - - "pypy-3.7-v7.3.7" # ahead to start it earlier because takes longer - - "pypy-2.7-v7.3.6" # ahead to start it earlier because takes longer - "3.9" - "3.8" - "3.7" @@ -30,9 +31,8 @@ jobs: - "2.7" os: - ubuntu-20.04 + - macos-12 - windows-2022 - - macos-10.15 - steps: - name: Setup python for tox uses: actions/setup-python@v4 @@ -49,16 +49,11 @@ jobs: python-version: ${{ matrix.py }} - name: Pick environment to run run: | - import codecs - import os - import platform - import sys - cpy = platform.python_implementation() == "CPython" - base =("{}{}{}" if cpy else "{}{}").format("py" if cpy else "pypy", *sys.version_info[0:2]) - env = "TOXENV={}\n".format(base) - print("Picked:\n{}for{}".format(env, sys.version)) + import codecs; import os; import platform; import sys + env = 'TOXENV=py{}{}{}'.format("" if platform.python_implementation() == "CPython" else "py", sys.version_info.major, sys.version_info.minor) + print("Picked: {} for {} based of {}".format(env, sys.version, sys.executable)) with codecs.open(os.environ["GITHUB_ENV"], "a", "utf-8") as file_handler: - file_handler.write(env) + file_handler.write(env) shell: python - name: Setup test suite run: tox -vv --notest @@ -79,7 +74,7 @@ jobs: coverage: name: Combine coverage - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: test steps: - uses: actions/checkout@v3 @@ -116,7 +111,7 @@ jobs: fail-fast: false matrix: os: - - ubuntu-20.04 + - ubuntu-22.04 - windows-2022 tox_env: - dev @@ -142,7 +137,7 @@ jobs: publish: if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') needs: [ check, coverage ] - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Setup python to build package uses: actions/setup-python@v4 @@ -156,7 +151,7 @@ jobs: - name: Build sdist and wheel run: python -m build -s -w . -o dist - name: Publish to PyPi - uses: pypa/gh-action-pypi-publish@master + uses: pypa/gh-action-pypi-publish@v1.5.1 with: skip_existing: true user: __token__ diff --git a/tox.ini b/tox.ini index d8e94cd16..8a8972bcc 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,7 @@ [tox] envlist = fix_lint + py311 py310 py39 py38 @@ -73,7 +74,7 @@ commands = coverage xml -o {toxworkdir}/coverage.xml coverage html -d {toxworkdir}/htmlcov diff-cover --compare-branch {env:DIFF_AGAINST:origin/master} {toxworkdir}/coverage.xml -depends = py27, py35, py36, py37, py38, py39, py310, pypy, pypy3 +depends = py27, py35, py36, py37, py38, py39, py310, py311, pypy, pypy3 [testenv:docs] description = invoke sphinx-build to build the HTML docs