Skip to content

Commit

Permalink
CI: Validate on Python 3.6+
Browse files Browse the repository at this point in the history
You never know how you possibly save someone's life with that.
  • Loading branch information
amotl committed Oct 25, 2024
1 parent 106e5e9 commit 68bbea0
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 7 deletions.
41 changes: 37 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,57 @@ jobs:
fail-fast: false
matrix:
os: [
"ubuntu-latest",
"ubuntu-20.04",
"macos-12",
"macos-latest",
"windows-latest",
]
python-version: [
"3.6",
"3.7",
"3.8",
"3.9",
"3.10",
"3.11",
"3.12",
"3.13",
"pypy3.10",
]

exclude:

# Exclude test matrix slots that are no longer supported by GHA runners.
- os: 'macos-latest'
python-version: '3.6'
- os: 'macos-latest'
python-version: '3.7'

# Exclude Python 3.7 on Windows, because GHA fails on it.
#
# SyntaxError: Non-UTF-8 code starting with '\x83' in file
# C:\hostedtoolcache\windows\Python\3.7.9\x64\Scripts\poe.exe
# on line 2, but no encoding declared;
# see http://python.org/dev/peps/pep-0263/ for details
#
# https://github.com/kennethreitz/responder/actions/runs/11526258626/job/32090071392?pr=546#step:6:73
- os: 'windows-latest'
python-version: '3.7'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: yezz123/setup-uv@v4
- run: uv pip install --editable '.[graphql,develop,test]' --system
- run: poe check

- name: Install package and run software tests (Python 3.6)
if: matrix.python-version == '3.6'
run: |
pip install '.[graphql,develop,test]'
poe test
- name: Install and completely validate package (Python >=3.6)
if: matrix.python-version != '3.6'
run: |
uv pip install '.[graphql,develop,test]' --system
poe check
14 changes: 11 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"aiofiles",
"apispec>=1.0.0b1",
"chardet",
"docopt-ng",
"marshmallow",
"requests",
"requests-toolbelt",
Expand Down Expand Up @@ -76,11 +75,16 @@ def run(self):
url="https://github.com/kennethreitz/responder",
packages=find_packages(exclude=["tests"]),
package_data={},
python_requires=">=3.10",
python_requires=">=3.6",
setup_requires=[],
install_requires=required,
extras_require={
"develop": ["poethepoet", "pyproject-fmt", "ruff", "validate-pyproject"],
"develop": [
"poethepoet",
"pyproject-fmt; python_version>='3.7'",
"ruff; python_version>='3.7'",
"validate-pyproject",
],
"graphql": ["graphene"],
"release": ["build", "twine"],
"test": ["pytest", "pytest-cov", "pytest-mock", "flask"],
Expand All @@ -95,6 +99,10 @@ def run(self):
"Operating System :: OS Independent",
"Programming Language :: Python",
"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.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand Down

0 comments on commit 68bbea0

Please sign in to comment.