Skip to content

Commit

Permalink
Merge pull request #238 from uploadcare/chore/py-3.11-new
Browse files Browse the repository at this point in the history
Test against newer versions of Python and fix the test workflow
  • Loading branch information
evgkirov committed Jun 23, 2023
2 parents 51f47f6 + 3f177bb commit 7ee3c1d
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v1
with:
Expand Down
57 changes: 45 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
python-version: [3.9]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand All @@ -43,21 +43,46 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']
include:
- os: ubuntu-20.04
python-version: '3.6'
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12-dev']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.1.15 # needed for py3.6
version: 1.4.2
virtualenvs-create: true
virtualenvs-in-project: false
- name: Install dependencies
run: |
poetry install
- name: Test with pytest
run: |
make test-functional
functional-legacy-py:
needs: lint

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ['3.6']

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.1.15
virtualenvs-create: true
virtualenvs-in-project: false
- name: Install dependencies
Expand Down Expand Up @@ -85,17 +110,25 @@ jobs:
# django versions that support py3.10
- python-version: '3.10'
django-version: 3.2
- python-version: '3.10'
django-version: 4.0

# django versions that support py3.11
- python-version: '3.11'
django-version: 4.1
- python-version: '3.11'
django-version: 4.2

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.1.15
version: 1.4.2
virtualenvs-create: true
virtualenvs-in-project: false
- name: Install dependencies
Expand All @@ -109,7 +142,7 @@ jobs:
make test-django
django-legacy-py:
needs: functional
needs: functional-legacy-py
runs-on: ubuntu-20.04
strategy:
matrix:
Expand All @@ -120,7 +153,7 @@ jobs:
django-version: ['1.11', '2.2', '3.0', '3.1', '3.2']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -149,7 +182,7 @@ jobs:
python-version: [3.9]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Features
Requirements
============

``pyuploadcare`` requires Python 3.6, 3.7, 3.8, 3.9, 3.10
``pyuploadcare`` requires Python 3.6, 3.7, 3.8, 3.9, 3.10, 3.11

To use ``pyuploadcare`` with Python 2.7 please install ``pyuploadcare < 3.0``.

Expand Down
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ classifiers = [
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'License :: OSI Approved :: MIT License',
]

Expand Down Expand Up @@ -54,7 +55,15 @@ flake8 = "^3.9.2"
mypy = "^0.910"
flake8-print = "^4.0.0"
pytest-vcr = "^1.0.2"
yarl = [
{version = "^1.7.2", python = ">=3.6,<3.7"},
{version = "^1.9.2", python = "^3.7"}
]
Django = "^3.2.7"
coverage = [
{version = "^6.2", python = ">=3.6,<3.7"},
{version = "^7.2.5", python = "^3.7"}
]
pytest-cov = "^2.12.1"
python-coveralls = "^2.9.3"
tox-pyenv = "^1.1.0"
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
isolated_build = True
envlist=
# core lib tests
py{36,37,38,39,310}-api,
py{36,37,38,39,310,311}-api,

# old django versions
py{36,37}-dj1.11-django
Expand All @@ -30,6 +30,7 @@ basepython =
py38: python3.8
py39: python3.9
py310: python3.10
py311: python3.11
deps =
pytest
mock
Expand Down

0 comments on commit 7ee3c1d

Please sign in to comment.