Skip to content

Commit

Permalink
Merge pull request #130 from ymyzk/tox4-python-3.11
Browse files Browse the repository at this point in the history
tox4: Add Python 3.11 support
  • Loading branch information
ymyzk committed Nov 13, 2022
2 parents 023a8be + 3326fed commit 59dafcc
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 18 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/packaging.yml
Expand Up @@ -15,12 +15,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
python-version: [3.11]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -30,7 +30,7 @@ jobs:
run: python -m build
- name: Run twine check
run: twine check dist/*
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: tox-gh-actions-dist
path: dist
26 changes: 16 additions & 10 deletions .github/workflows/tests.yml
Expand Up @@ -13,17 +13,23 @@ jobs:
matrix:
# https://help.github.com/articles/virtual-environments-for-github-actions
platform:
- ubuntu-18.04
- ubuntu-latest # ubuntu-20.04
- macos-latest # macOS-10.15
- windows-2016
- windows-latest # windows-2019
python-version: [3.7, 3.8, 3.9, '3.10', pypy-3.7]
- macos-latest # macOS-11
- windows-latest # windows-2022
python-version: [3.7, 3.8, 3.9, '3.10', '3.11', 3.12-dev, pypy-3.7, pypy-3.8, pypy-3.9]

steps:
- uses: actions/checkout@v3
if: ${{ ! startsWith(matrix.python-version, 'pypy-') }}
- uses: actions/checkout@v1
if: ${{ startsWith(matrix.python-version, 'pypy-') }}
# Using actions/checkout@v2 or later with pypy causes an error
# https://foss.heptapod.net/pypy/pypy/-/issues/3640
# py.error.ENOENT: [No such file or directory]:
# listdir('/home/runner/work/tox-gh-actions/tox-gh-actions/.tox/dist/
# warnings.warn(f\'"{wd.path}" is shallow and may cause errors\')',)
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -34,12 +40,12 @@ jobs:
- name: Test with tox
run: tox
- name: Upload coverage.xml
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.9' }}
uses: actions/upload-artifact@v2
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.11' }}
uses: actions/upload-artifact@v3
with:
name: tox-gh-actions-coverage
path: coverage.xml
if-no-files-found: error
- name: Upload coverage.xml to codecov
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.9' }}
uses: codecov/codecov-action@v1
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.11' }}
uses: codecov/codecov-action@v2
10 changes: 6 additions & 4 deletions setup.cfg
Expand Up @@ -27,6 +27,7 @@ classifiers =
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy
Topic :: Software Development :: Testing
Expand Down Expand Up @@ -78,14 +79,15 @@ envlist =
black
flake8
mypy
{py37,py38,py39,py310,pypy2,pypy3}-toxlatest
{py37,py38,py39,py310,py311,pypy2,pypy3}-toxlatest

[gh-actions]
python =
3.7: py37
3.8: py38, black, flake8
3.9: py39, mypy
3.10: py310
3.8: py38
3.9: py39
3.10: py310, black, flake8, mypy
3.11: py311
pypy-2: pypy2
pypy-3: pypy3

Expand Down

0 comments on commit 59dafcc

Please sign in to comment.