11CUR_PATH =$(shell pwd)
22FILES =$(shell git ls-files transifex* tests* )
33
4- build :
4+ # --- Build ---
5+
6+ build : \
7+ build_dj1.11_py3.6 \
8+ build_dj2.0_py3.6 \
9+ build_dj2.2_py3.8 \
10+ build_dj3.2_py3.9 \
11+ build_dj4.1_py3.11
12+
13+ build_dj1.11_py3.6 :
514 DOCKER_BUILDKIT=1 docker build \
615 --no-cache \
716 --progress=plain \
817 --build-arg PYTHON_VERSION=3.6 \
918 --build-arg DJANGO_VERSION=1.11 \
1019 -t native:3.6-1.11-latest \
1120 -f Dockerfile-tmpl .
21+
22+ build_dj2.0_py3.6 :
1223 DOCKER_BUILDKIT=1 docker build \
1324 --no-cache \
1425 --progress=plain \
1526 --build-arg PYTHON_VERSION=3.6 \
1627 --build-arg DJANGO_VERSION=2.0 \
1728 -t native:3.6-2.0-latest \
1829 -f Dockerfile-tmpl .
30+
31+ build_dj2.2_py3.8 :
1932 DOCKER_BUILDKIT=1 docker build \
2033 --no-cache \
2134 --progress=plain \
2235 --build-arg PYTHON_VERSION=3.8 \
2336 --build-arg DJANGO_VERSION=2.2 \
2437 -t native:3.8-2.2-latest \
2538 -f Dockerfile-tmpl .
39+
40+ build_dj3.2_py3.9 :
2641 DOCKER_BUILDKIT=1 docker build \
2742 --no-cache \
2843 --progress=plain \
@@ -31,13 +46,26 @@ build:
3146 -t native:3.9-3.2-latest \
3247 -f Dockerfile-tmpl .
3348
49+ build_dj4.1_py3.11 :
50+ DOCKER_BUILDKIT=1 docker build \
51+ --no-cache \
52+ --progress=plain \
53+ --build-arg PYTHON_VERSION=3.11 \
54+ --build-arg DJANGO_VERSION=4.1 \
55+ -t native:3.11-4.1-latest \
56+ -f Dockerfile-tmpl .
57+
58+ # --- Code quality ---
59+
3460code_quality :
3561 git diff origin/devel..$(git rev-parse HEAD ) --name-only | \
3662 xargs docker run --rm \
3763 --user $$(id -u ) :$$(id -g ) \
3864 --mount src="$$(pwd)",target=/src,type=bind \
3965 transifex/txlint --files
4066
67+ # --- Shell ---
68+
4169shell_dj1.11_py3.6 :
4270 # Django 1.11 (3.6)
4371 docker run --rm -it --entrypoint bash native:3.6-1.11-latest
@@ -54,27 +82,51 @@ shell_dj3.2_py3.9:
5482 # Django 3.2 (Python 3.9)
5583 docker run --rm -it --entrypoint bash native:3.9-3.2-latest
5684
57- localtests :
85+ shell_dj4.1_py3.11 :
86+ # Django 4.1 (Python 3.11)
87+ docker run --rm -it --entrypoint bash native:3.11-4.1-latest
88+
89+ # --- Tests ---
90+
91+ localtests : \
92+ tests_dj1.11_py3.6 \
93+ tests_dj2.0_py3.6 \
94+ tests_dj2.2_py3.8 \
95+ tests_dj3.2_py3.9 \
96+ tests_dj4.1_py3.11 \
97+ tests_coverage
98+
99+ tests_dj1.11_py3.6 :
58100 # Django 1.11 (3.6)
59101 docker run -v $(CUR_PATH ) :/usr/app \
60102 --rm native:3.6-1.11-latest\
61103 pytest --cov --cov-append --cov-report=term-missing
62104
105+ tests_dj2.0_py3.6 :
63106 # Django 2.0 (Python 3.6)
64107 docker run -v $(CUR_PATH ) :/usr/app \
65108 --rm native:3.6-2.0-latest\
66109 pytest --cov --cov-append --cov-report=term-missing
67110
111+ tests_dj2.2_py3.8 :
68112 # Django 2.2 (Python 3.8)
69113 docker run -v $(CUR_PATH ) :/usr/app \
70114 --rm native:3.8-2.2-latest\
71115 pytest --cov --cov-append --cov-report=term-missing
72116
117+ tests_dj3.2_py3.9 :
73118 # Django 3.2 (Python 3.9)
74119 docker run -v $(CUR_PATH ) :/usr/app \
75120 --rm native:3.9-3.2-latest\
76121 pytest --cov --cov-append --cov-report=term-missing
77122
123+ tests_dj4.1_py3.11 :
124+ # Django 4.1 (Python 3.11)
125+ docker run -v $(CUR_PATH ) :/usr/app \
126+ --rm native:3.11-4.1-latest\
127+ pytest --cov --cov-append --cov-report=term-missing
128+
129+ tests_coverage :
78130 # Coverage report
79131 docker run -v $(CUR_PATH ) :/usr/app \
80132 --rm native:3.6-1.11-latest \
0 commit comments