File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed
Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -181,6 +181,11 @@ down:
181181 @echo " Shutting down all docker compose services..."
182182 @docker compose down
183183
184+ .PHONY : test-down
185+ test-down :
186+ @echo " Shutting down all test docker compose services..."
187+ @docker compose -f compose.test.yml down
188+
184189.PHONY : test-setup
185190test-setup :
186191 @echo " Setting up test database..."
@@ -206,7 +211,7 @@ test: test-setup
206211 @$(MAKE ) test-frontend
207212
208213.PHONY : playwright-local
209- playwright-local : test-system-setup build-frontend-test-assets
214+ playwright-local : test-down test- system-setup build-frontend-test-assets
210215 @cd playwright; \
211216 npx playwright test --project=local
212217
@@ -264,7 +269,7 @@ test-system-setup: test-setup
264269
265270.PHONY : test-server
266271test-server : test-system-setup build-frontend-test-assets
267- bin/npr --test --publish 8008:8008 python manage.py runserver 0.0.0.0:8008
272+ docker compose -f compose.test.yml up django-web
268273
269274# ##
270275# whole project concerns
Original file line number Diff line number Diff line change 11name : npd
22
3- # by using `compose.test.yml` alone with `docker compose -f compose.test.yml and
4- # the `extends:` settings for each of the named services, we can merge these
5- # service definitions cleanly with the ones that already exist in the base
6- # compose.yml file
7-
83services :
94 db :
105 extends :
@@ -35,6 +30,9 @@ services:
3530 depends_on : !override
3631 - db
3732 - db-migrations
33+ command : python manage.py runserver 0.0.0.0:8008
34+ ports :
35+ - " 8008:8008"
3836
3937volumes :
4038 postgres_data :
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ export default defineConfig({
103103 /* Run your local dev server before starting the tests */
104104 webServer : {
105105 cwd : "../" ,
106- command : "bin/npr --test --publish 8008:8008 python manage.py runserver 0.0.0.0:8008 " ,
106+ command : "docker compose -f compose.test.yml up django-web " ,
107107 url : "http://localhost:8008" ,
108108 reuseExistingServer : ! process . env . CI ,
109109 timeout : 300000 , // give at least 5 minutes to download all container dependencies
You can’t perform that action at this time.
0 commit comments