Skip to content

Commit e3894f6

Browse files
authored
Check 3.11 support (#158)
1 parent 1957538 commit e3894f6

File tree

3 files changed

+18
-29
lines changed

3 files changed

+18
-29
lines changed

.github/workflows/check.yml

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,23 @@ concurrency:
1010
cancel-in-progress: true
1111

1212
jobs:
13-
lint:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- uses: actions/checkout@v3
17-
- uses: actions/setup-python@v4
18-
with:
19-
python-version: "3.10"
20-
- uses: pre-commit/[email protected]
21-
2213
test:
2314
name: test ${{ matrix.py }} - ${{ matrix.os }}
2415
runs-on: ${{ matrix.os }}
2516
strategy:
2617
fail-fast: false
2718
matrix:
2819
py:
20+
- "3.11.0-beta.4"
2921
- "3.10"
30-
- "pypy-3.7-v7.3.7" # ahead to start it earlier because takes longer
22+
- "pypy-3.7-v7.3.9" # ahead to start it earlier because takes longer
3123
- "3.9"
3224
- "3.8"
3325
- "3.7"
3426
os:
35-
- ubuntu-20.04
27+
- ubuntu-22.04
3628
- windows-2022
37-
- macos-10.15
29+
- macos-12
3830

3931
steps:
4032
- name: Setup python for tox
@@ -52,16 +44,11 @@ jobs:
5244
python-version: ${{ matrix.py }}
5345
- name: Pick environment to run
5446
run: |
55-
import codecs
56-
import os
57-
import platform
58-
import sys
59-
cpy = platform.python_implementation() == "CPython"
60-
base =("{}{}{}" if cpy else "{}{}").format("py" if cpy else "pypy", *sys.version_info[0:2])
61-
env = "TOXENV={}\n".format(base)
62-
print("Picked:\n{}for{}".format(env, sys.version))
63-
with codecs.open(os.environ["GITHUB_ENV"], "a", "utf-8") as file_handler:
64-
file_handler.write(env)
47+
import os; import platform; import sys; from pathlib import Path
48+
env = f'TOXENV=py{"" if platform.python_implementation() == "CPython" else "py"}3{sys.version_info.minor}'
49+
print(f"Picked: {env} for {sys.version} based of {sys.executable}")
50+
with Path(os.environ["GITHUB_ENV"]).open("ta") as file_handler:
51+
file_handler.write(env)
6552
shell: python
6653
- name: Setup test suite
6754
run: tox -vv --notest
@@ -82,7 +69,7 @@ jobs:
8269

8370
coverage:
8471
name: Combine coverage
85-
runs-on: ubuntu-latest
72+
runs-on: ubuntu-22.04
8673
needs: test
8774
steps:
8875
- uses: actions/checkout@v3
@@ -119,8 +106,8 @@ jobs:
119106
fail-fast: false
120107
matrix:
121108
os:
122-
- ubuntu-latest
123-
- windows-latest
109+
- ubuntu-22.04
110+
- windows-2022
124111
tox_env:
125112
- dev
126113
- type
@@ -145,8 +132,8 @@ jobs:
145132

146133
publish:
147134
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
148-
needs: [ check, coverage, lint ]
149-
runs-on: ubuntu-latest
135+
needs: [ check, coverage ]
136+
runs-on: ubuntu-22.04
150137
steps:
151138
- name: Setup python to build package
152139
uses: actions/setup-python@v4
@@ -160,7 +147,7 @@ jobs:
160147
- name: Build sdist and wheel
161148
run: python -m build -s -w . -o dist
162149
- name: Publish to PyPi
163-
uses: pypa/gh-action-pypi-publish@master
150+
uses: pypa/gh-action-pypi-publish@v1.5.1
164151
with:
165152
skip_existing: true
166153
user: __token__

src/filelock/main.pdf

219 KB
Binary file not shown.

tox.ini

Lines changed: 3 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
@@ -36,7 +37,7 @@ wheel_build_env = .pkg
3637
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
3738
passenv =
3839
*
39-
basepython = python3.9
40+
basepython = python3.10
4041
skip_install = true
4142
deps =
4243
pre-commit>=2
@@ -74,6 +75,7 @@ commands =
7475
coverage html -d {toxworkdir}/htmlcov
7576
diff-cover --compare-branch {env:DIFF_AGAINST:origin/main} {toxworkdir}/coverage.xml
7677
depends =
78+
py311
7779
py310
7880
py39
7981
py38

0 commit comments

Comments
 (0)