Skip to content

Commit

Permalink
Check 3.11 support (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborbernat committed Jul 27, 2022
1 parent 1957538 commit e3894f6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 29 deletions.
43 changes: 15 additions & 28 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,23 @@ concurrency:
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: pre-commit/action@v3.0.0

test:
name: test ${{ matrix.py }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
py:
- "3.11.0-beta.4"
- "3.10"
- "pypy-3.7-v7.3.7" # ahead to start it earlier because takes longer
- "pypy-3.7-v7.3.9" # ahead to start it earlier because takes longer
- "3.9"
- "3.8"
- "3.7"
os:
- ubuntu-20.04
- ubuntu-22.04
- windows-2022
- macos-10.15
- macos-12

steps:
- name: Setup python for tox
Expand All @@ -52,16 +44,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))
with codecs.open(os.environ["GITHUB_ENV"], "a", "utf-8") as file_handler:
file_handler.write(env)
import os; import platform; import sys; from pathlib import Path
env = f'TOXENV=py{"" if platform.python_implementation() == "CPython" else "py"}3{sys.version_info.minor}'
print(f"Picked: {env} for {sys.version} based of {sys.executable}")
with Path(os.environ["GITHUB_ENV"]).open("ta") as file_handler:
file_handler.write(env)
shell: python
- name: Setup test suite
run: tox -vv --notest
Expand All @@ -82,7 +69,7 @@ jobs:

coverage:
name: Combine coverage
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: test
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -119,8 +106,8 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- ubuntu-22.04
- windows-2022
tox_env:
- dev
- type
Expand All @@ -145,8 +132,8 @@ jobs:

publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs: [ check, coverage, lint ]
runs-on: ubuntu-latest
needs: [ check, coverage ]
runs-on: ubuntu-22.04
steps:
- name: Setup python to build package
uses: actions/setup-python@v4
Expand All @@ -160,7 +147,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__
Expand Down
Binary file added src/filelock/main.pdf
Binary file not shown.
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[tox]
envlist =
fix_lint
py311
py310
py39
py38
Expand Down Expand Up @@ -36,7 +37,7 @@ wheel_build_env = .pkg
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
passenv =
*
basepython = python3.9
basepython = python3.10
skip_install = true
deps =
pre-commit>=2
Expand Down Expand Up @@ -74,6 +75,7 @@ commands =
coverage html -d {toxworkdir}/htmlcov
diff-cover --compare-branch {env:DIFF_AGAINST:origin/main} {toxworkdir}/coverage.xml
depends =
py311
py310
py39
py38
Expand Down

0 comments on commit e3894f6

Please sign in to comment.