-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
53 lines (38 loc) · 1.54 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
45
46
47
48
49
50
51
52
53
SHELL := /bin/bash
.PHONY: setup
OS := $(shell uname)
all: setup-testing-environment makemigrations migrate runserver
setup:
ifeq ($(OS),Darwin) # Mac OS X
./setup/setup-osx.sh
else ifeq ($(OS),Linux)
./setup/setup-unix.sh
else
powershell -NoProfile -ExecutionPolicy Bypass -File ".\setup\setup-windows.ps1"
endif
setup-testing-environment:
cd tests/test_app && ./setup_secrets.sh
makemigrations:
source .venv/bin/activate && python tests/test_app/manage.py makemigrations
migrate:
source .venv/bin/activate && python tests/test_app/manage.py migrate
reset-makemigrations:
cd django_napse && find . -path "*/migrations/*.py" -not -name "__init__.py" -delete && find . -path "*/migrations/*.pyc" -delete && cd .. && rm tests/test_app/db.sqlite3
runserver:
source .venv/bin/activate && python tests/test_app/manage.py runserver_plus
up:
make makemigrations && make migrate && make runserver
clean:
rm tests/test_app/db.sqlite3 && rm dump.rdb
celery:
source .venv/bin/activate && watchfiles --filter python celery.__main__.main --args "-A tests.test_app worker --beat --scheduler django -l INFO" --verbosity info
shell:
source .venv/bin/activate && python tests/test_app/manage.py shell
test:
source .venv/bin/activate && python tests/test_app/manage.py test -v2 --keepdb --parallel
coverage:
source .venv/bin/activate && coverage run tests/test_app/manage.py test -v2 --keepdb && coverage html && coverage report
coverage-open: coverage
open htmlcov/index.html
mkdocs:
source .venv/bin/activate && mkdocs serve --dev-addr=0.0.0.0:8005