Skip to content

Commit

Permalink
Test against recent Python and Django versions (#170)
Browse files Browse the repository at this point in the history
Test against recent Python and Django versions
  • Loading branch information
stefan6419846 committed Jan 17, 2024
2 parents 12ee25a + f646ded commit af5d4c7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 11 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,29 @@ jobs:
- python: '3.10'
tox_env: 'py310-dj32-drf314'
- python: '3.8'
tox_env: 'py38-dj41-drf314'
tox_env: 'py38-dj42-drf314'
- python: '3.9'
tox_env: 'py39-dj41-drf314'
tox_env: 'py39-dj42-drf314'
- python: '3.10'
tox_env: 'py310-dj41-drf314'
tox_env: 'py310-dj42-drf314'
- python: '3.11'
tox_env: 'py311-dj41-drf314'
tox_env: 'py311-dj42-drf314'
- python: '3.12'
tox_env: 'py312-dj42-drf314'
- python: '3.10'
tox_env: 'py310-dj50-drf314'
- python: '3.11'
tox_env: 'py311-dj50-drf314'
- python: '3.12'
tox_env: 'py312-dj50-drf314'

runs-on: ubuntu-22.04
name: Python ${{ matrix.python }} with packages ${{ matrix.tox_env }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

Expand Down
3 changes: 2 additions & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pytest==7.3.1
pytest==7.3.1; python_version<"3.8"
pytest>=7.4.0; python_version>"3.7" # New `ast` classes: https://github.com/pytest-dev/pytest/commit/9335a0b4453dbb08a07b6ac1b33d1ed3d17c45a5
pytest-cov==4.0.0
pytest-django
flake8==6.0.0
Expand Down
12 changes: 8 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
[tox]
# See https://docs.djangoproject.com/en/4.1/faq/install/#what-python-version-can-i-use-with-django
# See https://docs.djangoproject.com/en/5.0/faq/install/#what-python-version-can-i-use-with-django
# EOL: https://endoflife.date/django
envlist =
py{38,39}-dj22-drf{311,313}
py{38,39,310}-dj32-drf{314}
py{38,39,310,311}-dj41-drf{314}
py{38,39,310,311,312}-dj42-drf{314}
py{310,311,312}-dj50-drf{314}

[pytest]
norecursedirs = examples
Expand All @@ -22,8 +24,10 @@ deps =
dj22: pytest-django~=4.5.2
dj32: Django~=3.2.0
dj32: pytest-django~=4.5.2
dj41: Django~=4.1.7
dj41: pytest-django~=4.5.2
dj42: Django~=4.2.9
dj42: pytest-django~=4.5.2
dj50: Django~=5.0.1
dj50: pytest-django~=4.5.2
drf311: djangorestframework~=3.11.2
drf313: djangorestframework~=3.13.1
drf314: djangorestframework~=3.14.0
Expand Down

0 comments on commit af5d4c7

Please sign in to comment.