-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
53 lines (44 loc) · 1.12 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
.PHONY: setup run test unit-coverage e2e-coverage coverage deploy clean python
setup:
virtualenv-2.7 . && \
source bin/activate && \
pip install \
coverage \
flask \
mock \
nose2 \
nose-exclude \
nosegae \
oauth2 \
pytest \
pyyaml
ls app/secrets.py || cp app/secrets.py_TEMPLATE app/secrets.py
run: setup
dev_appserver.py .
test:
. ./bin/activate && nosetests --logging-level=ERROR --with-gae
unit-coverage:
make EXCLUDE=app/tests/e2e coverage
e2e-coverage:
make EXCLUDE=app/tests/unit coverage
coverage:
rm -f .coverage && \
nosetests \
--exclude-dir=${EXCLUDE} \
--logging-level=ERROR \
--with-gae \
--with-coverage \
--cover-package=app \
--cover-branches \
--cover-erase \
--cover-html && \
echo "Report: file://`pwd`/cover/index.html"
# Run this as PROJECT_ID=<your-project-id> make deploy
deploy: setup test
appcfg.py -A ${PROJECT_ID} -V dev update .
clean:
rm -rf bin/ lib/ cover/ man/ include && find . -name '*.pyc' | xargs -n 1 rm
# Start a python shell where you can import app module. Assumes App
# Engine related python files are in /usr/local
python:
PYTHONPATH=/usr/local/google_appengine python