-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
44 lines (29 loc) · 1.19 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
default: fix-lint lint test
lint:
poetry run pylint secured_fields test_secured_fields
.test-pg:
cd test_secured_fields && DATABASE_URL=postgresql://postgres:P%40ssw0rd@localhost:5432/db poetry run coverage run manage.py test
.test-mysql:
cd test_secured_fields && DATABASE_URL=mysql://root:P%[email protected]:3306/db poetry run coverage run manage.py test
.coverage-erase:
cd test_secured_fields && poetry run coverage erase
.coverage-report:
cd test_secured_fields && poetry run coverage report -m
test-pg: .coverage-erase .test-pg .coverage-report
test-mysql: .coverage-erase .test-mysql .coverage-report
yapf:
poetry run yapf -ipr secured_fields test_secured_fields
migrations:
cd test_secured_fields && poetry run python manage.py makemigrations $(filter-out $@,$(MAKECMDGOALS))
migrate:
cd test_secured_fields && poetry run python manage.py migrate $(filter-out $@,$(MAKECMDGOALS))
shell:
cd test_secured_fields && poetry run python manage.py shell_plus
generate-key:
cd test_secured_fields && poetry run python manage.py generate_key
up-db:
cd test_secured_fields && docker-compose up -d $(filter-out $@,$(MAKECMDGOALS))
down-db:
cd test_secured_fields && docker-compose down
%:
@: