Skip to content

Commit 89bd1eb

Browse files
committed
feat: add Python 3.11 support
1 parent 78e4135 commit 89bd1eb

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,28 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
os: [ubuntu-20.04]
22-
python-version: [3.8, 3.12]
23-
toxenv: [django42, quality, translations-django42]
22+
toxenv: [py38-django42, py311-django42, py312-django42, py38-quality, py311-quality, py312-quality, translations]
2423

2524
steps:
2625
- name: checkout repo
2726
uses: actions/checkout@v3
2827
with:
2928
submodules: recursive
3029

30+
- name: Extract the Python version from tox environment
31+
run: |
32+
if [[ "${{ matrix.toxenv }}" =~ py[0-9]+ ]]; then
33+
PYTHON_VERSION=$(echo "${{ matrix.toxenv }}" | sed -E 's/py([0-9])([0-9]+).*/\1.\2/')
34+
else
35+
# Default version
36+
PYTHON_VERSION=3.8
37+
fi
38+
echo "PYTHON_VERSION=$PYTHON_VERSION" >> $GITHUB_ENV
39+
3140
- name: setup python
3241
uses: actions/setup-python@v4
3342
with:
34-
python-version: ${{ matrix.python-version }}
43+
python-version: ${{ env.PYTHON_VERSION }}
3544

3645
- name: Install translations dependencies
3746
if: ${{ startsWith(matrix.toxenv, 'translations') }}

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ def package_data(pkg, root_list):
118118
classifiers=[
119119
'Programming Language :: Python',
120120
'Programming Language :: Python :: 3.8',
121+
'Programming Language :: Python :: 3.11',
121122
'Programming Language :: Python :: 3.12',
122123
'Framework :: Django',
123124
'Framework :: Django :: 4.2',

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py{38, 312}-django{42},quality,translations-django{42}
2+
envlist = py{38,311,312}-django{42},py{38,311,312}-quality,translations
33

44
[pycodestyle]
55
exclude = .git,.tox
@@ -34,7 +34,7 @@ commands =
3434
pylint drag_and_drop_v2
3535
pylint tests --rcfile=tests/pylintrc
3636

37-
[testenv:translations-django42]
37+
[testenv:translations]
3838
allowlist_externals =
3939
make
4040
deps =

0 commit comments

Comments
 (0)