Skip to content

Commit

Permalink
Add Wagtail 5.2/ Python 3.12 (#226)
Browse files Browse the repository at this point in the history
* Add Wagtail 5.2 and Python 3.12 to tox.ini
* Drop deprecated versions from tox.ini
* Add Python 3.12 classifier
* Add Python 3.12 to CI matrix
  • Loading branch information
zerolab authored Nov 1, 2023
1 parent accd29a commit eebf4e9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,17 @@ jobs:

strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- name: 🔒 Harden Runner
uses: step-security/harden-runner@v2
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
files.pythonhosted.org:443
objects.githubusercontent.com:443
github.com:443
pypi.org:443
api.github.com:443
Expand Down Expand Up @@ -73,7 +74,7 @@ jobs:

steps:
- name: 🔒 Harden Runner
uses: step-security/harden-runner@v2
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
disable-sudo: true
egress-policy: block
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Framework :: Wagtail",
"Framework :: Wagtail :: 4",
"Framework :: Wagtail :: 5",
Expand Down
19 changes: 13 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
[tox]
min_version = 4.0
min_version = 4.11

envlist =
py{38,39,310}-dj{32,41}-wagtail{41,50,51}
py{311}-dj{41,42}-wagtail{50,51}
py{38,39,310}-dj{32,41}-wagtail{41,51,52}
py{311}-dj{41,42}-wagtail{51,52}
py{312}-dj{42}-wagtail{52}

[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312

[testenv]
package = wheel
Expand All @@ -31,22 +33,27 @@ deps =
dj41: Django>=4.1,<4.2
dj42: Django>=4.2,<5.0
wagtail41: wagtail>=4.1,<4.2
wagtail50: wagtail>=5.0,<5.1
wagtail51: wagtail>=5.1,<5.2
interactive: wagtail>=4.1
wagtail52: wagtail>=5.2,<5.3

install_command = python -Im pip install -U {opts} {packages}

commands =
python -Im coverage run runtests.py {posargs: -v 2}

[testenv:coverage-report]
base_python = python3.11
; a bit of a hack - we want to keep deps to a minimum here
deps =
extras =
install_command = python -Im pip install -U "coverage[toml]>=7.0,<8.0"
commands =
python -Im coverage combine
python -Im coverage report -m

[testenv:wagtailmain]
description = Test with latest Wagtail main branch
base_python = python3.12
deps =
wagtailmain: git+https://github.com/wagtail/wagtail.git@main#egg=Wagtail

Expand All @@ -56,7 +63,7 @@ description = An interactive environment for local testing purposes
base_python = python3.11

deps =
wagtail>=4.1
wagtail>=5.2

commands_pre =
python {toxinidir}/manage.py makemigrations
Expand Down

0 comments on commit eebf4e9

Please sign in to comment.