@@ -34,13 +34,22 @@ update:
34
34
# TESTING/TYPES
35
35
# ----------------------------------------------------------------------
36
36
37
- test * ARGS :
38
- just command python -m pytest {{ ARGS }}
37
+ # Run the Playwright codegen command within the 'app' container
38
+ codegen * ARGS :
39
+ docker compose run --rm --no-deps -e DJANGO_VITE_DEV_SERVER_HOST=node app / bin/ bash -c " python manage.py runserver 0.0.0.0:8000 & while ! curl -s http://0.0.0.0:8000 > /dev/null; do sleep 1; done; playwright codegen {{ ARGS }} ; kill %1"
39
40
40
41
coverage :
41
42
rm -rf htmlcov
42
43
just command python -m coverage run -m pytest && python -m coverage html --skip-covered --skip-empty
43
44
45
+ # Run tests using pytest within the 'app' container, with optional arguments
46
+ @ test * ARGS :
47
+ docker compose run --rm --no-deps -e DJANGO_VITE_DEV_SERVER_HOST=node app pytest {{ ARGS }}
48
+
49
+ # Run tests with Playwright debug mode enabled, in the 'app' container, with optional arguments
50
+ @ test-debug * ARGS :
51
+ docker compose run --rm --no-deps -e DJANGO_VITE_DEV_SERVER_HOST=node -e PWDEBUG=1 app pytest {{ ARGS }}
52
+
44
53
types :
45
54
just command python -m mypy .
46
55
@@ -119,10 +128,6 @@ build-prod:
119
128
clean :
120
129
@ just down --volumes --rmi local
121
130
122
- # Run the Playwright codegen command within the 'app' container
123
- codegen * ARGS :
124
- docker compose run --rm --no-deps -e DJANGO_VITE_DEV_SERVER_HOST=node app / bin/ bash -c " python manage.py runserver 0.0.0.0:8000 & while ! curl -s http://0.0.0.0:8000 > /dev/null; do sleep 1; done; playwright codegen {{ ARGS }} ; kill %1"
125
-
126
131
# Run a command within the 'app' container
127
132
command * ARGS :
128
133
docker compose run --rm --no-deps app / bin/ bash -c " {{ ARGS }} "
@@ -175,14 +180,6 @@ stop:
175
180
tail * ARGS :
176
181
@ just logs ' --follow {{ ARGS }} '
177
182
178
- # Run tests using pytest within the 'app' container, with optional arguments
179
- @ test * ARGS :
180
- docker compose run --rm --no-deps -e DJANGO_VITE_DEV_SERVER_HOST=node app pytest {{ ARGS }}
181
-
182
- # Run tests with Playwright debug mode enabled, in the 'app' container, with optional arguments
183
- @ test-debug * ARGS :
184
- docker compose run --rm --no-deps -e DJANGO_VITE_DEV_SERVER_HOST=node -e PWDEBUG=1 app pytest {{ ARGS }}
185
-
186
183
# Start services using docker-compose, with optional arguments
187
184
up * ARGS :
188
185
docker compose up {{ ARGS }}
0 commit comments