Skip to content

Commit

Permalink
Test on Python 3.10 (#154)
Browse files Browse the repository at this point in the history
* Remove redundant Trove classifiers

They're automatically added by Poetry

* Require Python >= 3.6.2 to get latest Black

* Run tests on Python 3.10

* Run CI on Python 3.10

* Use latest poetry and tox on CI
  • Loading branch information
jodal committed Oct 8, 2021
1 parent d088d1e commit 23c4136
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
branches:
- main


jobs:
main:
strategy:
Expand All @@ -25,15 +24,18 @@ jobs:
- name: "Test: Python 3.9"
python: "3.9"
tox: py39
- name: "Test: Python 3.10"
python: "3.10"
tox: py310
coverage: true
- name: "Lint: flake8"
python: "3.9"
python: "3.10"
tox: flake8
- name: "Lint: mypy"
python: "3.9"
python: "3.10"
tox: mypy
- name: "Docs"
python: "3.9"
python: "3.10"
tox: docs

name: ${{ matrix.name }}
Expand All @@ -51,7 +53,7 @@ jobs:
key: ${{ runner.os }}-${{ matrix.python }}-${{ matrix.tox }}-pip-${{ hashFiles('pyproject.toml', 'tox.ini') }} }}
restore-keys: |
${{ runner.os }}-${{ matrix.python }}-${{ matrix.tox }}-pip-
- run: python -m pip install poetry==1.1.5 tox==3.23.0
- run: python -m pip install poetry==1.1.11 tox==3.24.4
- run: python -m tox -e ${{ matrix.tox }}
if: ${{ ! matrix.coverage }}
- run: python -m tox -e ${{ matrix.tox }} -- --cov-report=xml
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- run: python -m pip install poetry==1.1.5 tox==3.23.0
python-version: "3.10"
- run: python -m pip install poetry==1.1.11 tox==3.24.4
- run: tox --skip-missing-interpreters true
- run: poetry build
- run: poetry publish --username=__token__ --password=${{ secrets.PYPI_TOKEN }}
13 changes: 4 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,15 @@ classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.6", # Not automatically added because we require >= 3.6.2
]

[tool.poetry.dependencies]
python = "^3.6.1"
python = "^3.6.2"
importlib_metadata = {version = ">=1.6", python = "<3.8"}

[tool.poetry.dev-dependencies]
black = "^20.8b1"
black = "^21.9b0"
flake8 = "^3.9.2"
flake8-black = "^0.2.1"
flake8-bugbear = "^21.4.3"
Expand All @@ -40,7 +35,7 @@ pytest-mock = "^3.6.1"
tox = "^3.23.1"

[tool.black]
target-version = ["py36", "py37", "py38"]
target-version = ["py36", "py37", "py38", "py39"]

[tool.isort]
profile = "black"
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
isolated_build = true
envlist = py36, py37, py38, py39, docs, flake8, mypy
envlist = py36, py37, py38, py39, py310, docs, flake8, mypy

[testenv]
whitelist_externals = poetry
Expand Down

0 comments on commit 23c4136

Please sign in to comment.