Skip to content

Commit

Permalink
Add Python 3.12 to the test matrix, drop Django 4.1 (#242)
Browse files Browse the repository at this point in the history
* GitHub Actions: Add Python 3.12 to the testing
As discussed at #236 (review)
* tox.ini: Add py312
* Stop testing Django v4.1
  • Loading branch information
cclauss authored Jan 17, 2024
1 parent 5efd3a0 commit 829f7ac
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 73 deletions.
23 changes: 10 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
- run: pipx install "poetry>=1.1.12,<2"
- uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
cache: 'poetry'
- run: pip install tox
- run: tox -e lint,py311-dj50
- run: tox -e lint,py312-dj50
test_compatibility:
needs: test
runs-on: ubuntu-latest
Expand All @@ -24,21 +24,18 @@ jobs:
matrix:
include:
# Test with all supported Django versions, for all compatible Python versions.
# See https://docs.djangoproject.com/en/4.0/faq/install/#what-python-version-can-i-use-with-django for the official matrix.
# See https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django for the official matrix.
# Additionally test on Django’s main branch with the most recent Python version.
- python: "3.8"
toxenv: py38-dj32,py38-dj41,py38-dj42
toxenv: py38-dj32,py38-dj42
- python: "3.9"
toxenv: py39-dj32,py39-dj41,py39-dj42
toxenv: py39-dj32,py39-dj42
- python: "3.10"
# Skip testing Django 4.0, already tested in previous workflow job.
toxenv: py310-dj32,py310-dj41,py310-dj42,py310-djmain
toxenv: py310-dj32,py310-dj42,py310-dj50,py310-djmain
- python: "3.11"
toxenv: py311-dj41,py311-dj42,py311-djmain
# Tentative support for next Python pre-release.
# When django supports the version, uncomment this
# - python: "3.12"
# toxenv: py312-dj41
toxenv: py311-dj42,py311-dj50,py311-djmain
- python: "3.12"
toxenv: py312-dj42,py312-djmain
steps:
- uses: actions/checkout@v4
- run: pipx install "poetry>=1.1.12,<2"
Expand Down Expand Up @@ -68,7 +65,7 @@ jobs:
run: npm ci --no-audit
- run: npm run build
- run: pipx install "poetry>=1.1.12,<2"
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version-file: pyproject.toml
cache: 'poetry'
Expand Down
108 changes: 55 additions & 53 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Markdown = "^3.1"

[tool.poetry.dev-dependencies]
beautifulsoup4 = "^4.8"
coverage = "^6.2"
coverage = "^7.4"
flake8 = {version = "^7.0", python = ">=3.8.1,<4.0"}
isort = "^5.10.1"
mkdocs = "^1.1.2"
Expand Down
11 changes: 5 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[tox]
envlist =
py{38,39,310}-dj32
py{38,39,310,311}-dj41
py{38,39,310,311}-dj42
py{38,39,310,311}-dj50
py{310,311}-djmain
py{38,39,310,311,312}-dj42
py{310,311,312}-dj50
py{310,311,312}-djmain
lint
skipsdist = true

Expand All @@ -19,7 +18,6 @@ commands =
poetry run django-admin render_patterns --settings=tests.settings.dev --pythonpath=. --dry-run
deps =
dj32: Django>=3.2,<3.3
dj41: Django>=4.1,<4.2
dj42: Django>=4.2,<5.0
dj50: Django>=5.0,<5.1
djmain: https://github.com/django/django/archive/main.zip
Expand All @@ -32,7 +30,8 @@ commands =
poetry run black --check --diff .

[flake8]
ignore = C901,W503
ignore = W503
max-complexity = 13
max-line-length = 120
exclude = .tox,venv,migrations,node_modules

Expand Down

0 comments on commit 829f7ac

Please sign in to comment.