Skip to content

Commit 82ac996

Browse files
author
Nikos Vasileiou
authored
Merge pull request #114 from transifex/add-python312-targets
Add Django 4.2, Python 3.12 build targets
2 parents 1ea0add + 4639c29 commit 82ac996

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

.github/workflows/ci.yml

+11
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,17 @@ jobs:
8383
env:
8484
CODECOV_TOKEN: ${{secrets.codecov_token}}
8585

86+
python3_12-django4_2-tests:
87+
runs-on: ubuntu-latest
88+
steps:
89+
- uses: actions/checkout@v2
90+
- name: Test py3.12-dj4.2
91+
run: |
92+
docker build --build-arg PYTHON_VERSION=3.12 --build-arg DJANGO_VERSION=4.2 -t native -f Dockerfile-tmpl .
93+
docker run -e CODECOV_TOKEN=$CODECOV_TOKEN --rm native sh -c 'pytest --cov --cov-report=term-missing && codecov'
94+
env:
95+
CODECOV_TOKEN: ${{secrets.codecov_token}}
96+
8697
publish-pypi:
8798
needs: [
8899
quality-checks, python3_6-django1_11-tests,

Makefile

+22-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ build: \
88
build_dj2.0_py3.6 \
99
build_dj2.2_py3.8 \
1010
build_dj3.2_py3.9 \
11-
build_dj4.1_py3.11
11+
build_dj4.1_py3.11 \
12+
build_dj4.2_py3.12
1213

1314
build_dj1.11_py3.6:
1415
DOCKER_BUILDKIT=1 docker build \
@@ -55,6 +56,15 @@ build_dj4.1_py3.11:
5556
-t native:3.11-4.1-latest \
5657
-f Dockerfile-tmpl .
5758

59+
build_dj4.2_py3.12:
60+
DOCKER_BUILDKIT=1 docker build \
61+
--no-cache \
62+
--progress=plain \
63+
--build-arg PYTHON_VERSION=3.12 \
64+
--build-arg DJANGO_VERSION=4.2 \
65+
-t native:3.12-4.2-latest \
66+
-f Dockerfile-tmpl .
67+
5868
# --- Code quality ---
5969

6070
code_quality:
@@ -86,6 +96,10 @@ shell_dj4.1_py3.11:
8696
# Django 4.1 (Python 3.11)
8797
docker run --rm -it --entrypoint bash native:3.11-4.1-latest
8898

99+
shell_dj4.2_py3.12:
100+
# Django 4.2 (Python 3.12)
101+
docker run --rm -it --entrypoint bash native:3.12-4.2-latest
102+
89103
# --- Tests ---
90104

91105
localtests: \
@@ -94,6 +108,7 @@ localtests: \
94108
tests_dj2.2_py3.8 \
95109
tests_dj3.2_py3.9 \
96110
tests_dj4.1_py3.11 \
111+
tests_dj4.2_py3.12 \
97112
tests_coverage
98113

99114
tests_dj1.11_py3.6:
@@ -126,6 +141,12 @@ tests_dj4.1_py3.11:
126141
--rm native:3.11-4.1-latest\
127142
pytest --cov --cov-append --cov-report=term-missing
128143

144+
tests_dj4.2_py3.12:
145+
# Django 4.2 (Python 3.12)
146+
docker run -v $(CUR_PATH):/usr/app \
147+
--rm native:3.12-4.2-latest\
148+
pytest --cov --cov-append --cov-report=term-missing
149+
129150
tests_coverage:
130151
# Coverage report
131152
docker run -v $(CUR_PATH):/usr/app \

0 commit comments

Comments
 (0)