Skip to content

Commit

Permalink
Update supported Python versions (#1950)
Browse files Browse the repository at this point in the history
  • Loading branch information
blazewicz authored Dec 4, 2022
1 parent 71e5589 commit 77c596a
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 55 deletions.
92 changes: 46 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

env:
CACHE_VERSION: 1
DEFAULT_PYTHON: '3.9.14'
PYTHON_VERSION_DEFAULT: '3.9.15'
PRE_COMMIT_HOME: ~/.cache/pre-commit

jobs:
Expand All @@ -21,18 +21,18 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8.14', '3.9.14', '3.10.7']
python-version: ['3.8.14', '3.9.15', '3.10.8', '3.11.0']
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v2.1.4
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: venv
key: >-
Expand All @@ -57,15 +57,15 @@ jobs:
needs: prepare-base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v2.1.4
uses: actions/checkout@v3
- name: Set up Python ${{ env.PYTHON_VERSION_DEFAULT }}
uses: actions/setup-python@v4
id: python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
python-version: ${{ env.PYTHON_VERSION_DEFAULT }}
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: venv
key: >-
Expand All @@ -80,7 +80,7 @@ jobs:
exit 1
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ env.PRE_COMMIT_HOME }}
key: |
Expand All @@ -99,15 +99,15 @@ jobs:
needs: pre-commit
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v2.1.4
uses: actions/checkout@v3
- name: Set up Python ${{ env.PYTHON_VERSION_DEFAULT }}
uses: actions/setup-python@v4
id: python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
python-version: ${{ env.PYTHON_VERSION_DEFAULT }}
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: venv
key: >-
Expand All @@ -122,7 +122,7 @@ jobs:
exit 1
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ env.PRE_COMMIT_HOME }}
key: |
Expand All @@ -143,15 +143,15 @@ jobs:
needs: pre-commit
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v2.1.4
uses: actions/checkout@v3
- name: Set up Python ${{ env.PYTHON_VERSION_DEFAULT }}
uses: actions/setup-python@v4
id: python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
python-version: ${{ env.PYTHON_VERSION_DEFAULT }}
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: venv
key: >-
Expand All @@ -166,7 +166,7 @@ jobs:
exit 1
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ env.PRE_COMMIT_HOME }}
key: |
Expand All @@ -190,15 +190,15 @@ jobs:
needs: pre-commit
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v2.1.4
uses: actions/checkout@v3
- name: Set up Python ${{ env.PYTHON_VERSION_DEFAULT }}
uses: actions/setup-python@v4
id: python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
python-version: ${{ env.PYTHON_VERSION_DEFAULT }}
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: venv
key: >-
Expand All @@ -213,7 +213,7 @@ jobs:
exit 1
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ env.PRE_COMMIT_HOME }}
key: |
Expand All @@ -234,15 +234,15 @@ jobs:
needs: pre-commit
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v2.1.4
uses: actions/checkout@v3
- name: Set up Python ${{ env.PYTHON_VERSION_DEFAULT }}
uses: actions/setup-python@v4
id: python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
python-version: ${{ env.PYTHON_VERSION_DEFAULT }}
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: venv
key: >-
Expand All @@ -257,7 +257,7 @@ jobs:
exit 1
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ env.PRE_COMMIT_HOME }}
key: |
Expand All @@ -280,20 +280,20 @@ jobs:
needs: prepare-base
strategy:
matrix:
python-version: ['3.8.14', '3.9.14', '3.10.7']
python-version: ['3.8.14', '3.9.15', '3.10.8', '3.11.0']
name: >-
Run tests Python ${{ matrix.python-version }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2.1.4
uses: actions/setup-python@v4
id: python
with:
python-version: ${{ matrix.python-version }}
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: venv
key: >-
Expand Down Expand Up @@ -328,7 +328,7 @@ jobs:
-p no:sugar \
tests
- name: Upload coverage artifact
uses: actions/upload-artifact@v2.2.0
uses: actions/upload-artifact@v3
with:
name: coverage-${{ matrix.python-version }}
path: .coverage
Expand All @@ -347,15 +347,15 @@ jobs:
needs: pytest
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2.1.4
uses: actions/setup-python@v4
id: python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
python-version: ${{ env.PYTHON_VERSION_DEFAULT }}
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: venv
key: >-
Expand All @@ -369,15 +369,15 @@ jobs:
echo "Failed to restore Python virtual environment from cache"
exit 1
- name: Download all coverage artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
- name: Combine coverage results
run: |
. venv/bin/activate
coverage combine coverage*/.coverage*
coverage report --fail-under=72
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
- name: Upload coverage to Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ jobs:
name: Build and publish distributions to PyPI and TestPyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.6
uses: actions/setup-python@v1
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
version: 3.6
version: 3.9
- name: Install wheel
run: >-
pip install wheel
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ pytest-sugar
pytest-timeout
pytest-asyncio
pytest>=7.1.3
zigpy>=0.51.6
zigpy>=0.52
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ line_length = 88
indent = " "

[mypy]
python_version = 3.7
python_version = 3.9
check_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_calls = true
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
license="Apache License Version 2.0",
keywords="zha quirks homeassistant hass",
packages=find_packages(exclude=["tests"]),
python_requires=">=3",
install_requires=["zigpy>=0.51.6"],
python_requires=">=3.8",
install_requires=["zigpy>=0.52"],
tests_require=["pytest"],
)
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38, py39, py310, lint, black
envlist = py38, py39, py310, py311, lint, black
skip_missing_interpreters = True

[testenv]
Expand Down

0 comments on commit 77c596a

Please sign in to comment.