File tree Expand file tree Collapse file tree 4 files changed +15
-11
lines changed Expand file tree Collapse file tree 4 files changed +15
-11
lines changed Original file line number Diff line number Diff line change 11SHELL = /bin/bash
2-
3- .PHONY : all
2+ .PHONY : tests
43
54init :
65 cd django && make init
@@ -63,3 +62,7 @@ dump-db:
6362
6463import-db :
6564 @docker-compose exec pdb sh -c ' psql -U $$POSTGRES_USER $$POSTGRES_DB < /var/services/postgres/var/dump.sql'
65+
66+ tests :
67+ cd django && make tests
68+ cd vue && make tests
Original file line number Diff line number Diff line change 11GEMEINDESCAN_WEBUI_DJANGO =0.3.4
22DOCKER_EXEC =$(shell command -v docker > /dev/null && echo "docker-compose exec django")
3-
3+ all : run-tests run-tests-dev
44.PHONY : all
55default : dev
66
@@ -29,11 +29,11 @@ migrate:
2929 $(DOCKER_EXEC ) python3 manage.py migrate
3030 make collectstatic
3131
32- run- tests :
33- $(DOCKER_EXEC ) DJANGO_SETTINGS_MODULE=main.settings_tests pytest --create-db
32+ tests :
33+ $(DOCKER_EXEC ) pytest --create-db
3434
35- run- tests-dev :
36- $(DOCKER_EXEC ) DJANGO_SETTINGS_MODULE=main.settings_tests pytest --reuse-db -vvv --nomigrations
35+ tests-dev :
36+ $(DOCKER_EXEC ) pytest --reuse-db -vvv --nomigrations
3737
3838delete-gemeinden-django :
3939 $(DOCKER_EXEC ) python3 manage.py shell --command=" from gsmap.models import Municipality;Municipality.objects.all().delete()"
Original file line number Diff line number Diff line change @@ -17,8 +17,7 @@ def test_municipalities_exists():
1717 }
1818 }
1919 }
20- }''' ,
21- context = {})
20+ }''' , context = {})
2221 result = json .loads (json .dumps (result )) # remove OrderedDics, default in python 3.7+
2322 assert result == {
2423 "data" : {
@@ -116,8 +115,7 @@ def test_snapshots_exists():
116115 }
117116 }
118117 }
119- }''' ,
120- context = {})
118+ }''' , context = {})
121119 result = json .loads (
122120 json .dumps (result )) # remove OrderedDics, default in python 3.7+
123121 assert result == {
Original file line number Diff line number Diff line change 2424screenshotservice :
2525 $(DOCKER_EXEC ) node /opt/vue/screenshot-service/screenshot-server.js
2626
27+ tests :
28+ $(DOCKER_EXEC ) yarn test
29+
2730build :
2831 $(DOCKER_EXEC ) yarn build --mode production
2932 $(DOCKER_EXEC ) rsync -av --delete dist /var/services/django/static/
You can’t perform that action at this time.
0 commit comments