Skip to content

Commit e826f4a

Browse files
authored
Check 3.11 support (#2468)
Signed-off-by: Bernát Gábor <[email protected]>
1 parent a52bbeb commit e826f4a

File tree

2 files changed

+14
-18
lines changed

2 files changed

+14
-18
lines changed

.github/workflows/check.yml

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
py:
22+
- "3.11.0-beta.4"
23+
- "pypy-3.7-v7.3.9" # ahead to start it earlier because takes longer
24+
- "pypy-2.7-v7.3.9" # ahead to start it earlier because takes longer
2225
- "3.10"
23-
- "pypy-3.7-v7.3.7" # ahead to start it earlier because takes longer
24-
- "pypy-2.7-v7.3.6" # ahead to start it earlier because takes longer
2526
- "3.9"
2627
- "3.8"
2728
- "3.7"
@@ -30,9 +31,8 @@ jobs:
3031
- "2.7"
3132
os:
3233
- ubuntu-20.04
34+
- macos-12
3335
- windows-2022
34-
- macos-10.15
35-
3636
steps:
3737
- name: Setup python for tox
3838
uses: actions/setup-python@v4
@@ -49,16 +49,11 @@ jobs:
4949
python-version: ${{ matrix.py }}
5050
- name: Pick environment to run
5151
run: |
52-
import codecs
53-
import os
54-
import platform
55-
import sys
56-
cpy = platform.python_implementation() == "CPython"
57-
base =("{}{}{}" if cpy else "{}{}").format("py" if cpy else "pypy", *sys.version_info[0:2])
58-
env = "TOXENV={}\n".format(base)
59-
print("Picked:\n{}for{}".format(env, sys.version))
52+
import codecs; import os; import platform; import sys
53+
env = 'TOXENV=py{}{}{}'.format("" if platform.python_implementation() == "CPython" else "py", sys.version_info.major, sys.version_info.minor)
54+
print("Picked: {} for {} based of {}".format(env, sys.version, sys.executable))
6055
with codecs.open(os.environ["GITHUB_ENV"], "a", "utf-8") as file_handler:
61-
file_handler.write(env)
56+
file_handler.write(env)
6257
shell: python
6358
- name: Setup test suite
6459
run: tox -vv --notest
@@ -79,7 +74,7 @@ jobs:
7974

8075
coverage:
8176
name: Combine coverage
82-
runs-on: ubuntu-latest
77+
runs-on: ubuntu-22.04
8378
needs: test
8479
steps:
8580
- uses: actions/checkout@v3
@@ -116,7 +111,7 @@ jobs:
116111
fail-fast: false
117112
matrix:
118113
os:
119-
- ubuntu-20.04
114+
- ubuntu-22.04
120115
- windows-2022
121116
tox_env:
122117
- dev
@@ -142,7 +137,7 @@ jobs:
142137
publish:
143138
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
144139
needs: [ check, coverage ]
145-
runs-on: ubuntu-20.04
140+
runs-on: ubuntu-22.04
146141
steps:
147142
- name: Setup python to build package
148143
uses: actions/setup-python@v4
@@ -156,7 +151,7 @@ jobs:
156151
- name: Build sdist and wheel
157152
run: python -m build -s -w . -o dist
158153
- name: Publish to PyPi
159-
uses: pypa/gh-action-pypi-publish@master
154+
uses: pypa/gh-action-pypi-publish@v1.5.1
160155
with:
161156
skip_existing: true
162157
user: __token__

tox.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[tox]
22
envlist =
33
fix_lint
4+
py311
45
py310
56
py39
67
py38
@@ -73,7 +74,7 @@ commands =
7374
coverage xml -o {toxworkdir}/coverage.xml
7475
coverage html -d {toxworkdir}/htmlcov
7576
diff-cover --compare-branch {env:DIFF_AGAINST:origin/master} {toxworkdir}/coverage.xml
76-
depends = py27, py35, py36, py37, py38, py39, py310, pypy, pypy3
77+
depends = py27, py35, py36, py37, py38, py39, py310, py311, pypy, pypy3
7778

7879
[testenv:docs]
7980
description = invoke sphinx-build to build the HTML docs

0 commit comments

Comments
 (0)