-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (29 loc) · 1 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
.PHONY: docs test
help:
@echo " env create a development environment using virtualenv"
@echo " deps install dependencies using pip"
@echo " clean remove unwanted files like .pyc's"
@echo " lint check style with flake8"
@echo " test run all your tests using py.test"
@echo " docker-test test with docker image (like CI)"
@echo " docker-build Build cs61a/ok-server image"
env:
easy_install pip && \
pip install virtualenv && \
virtualenv . && \
source ./env/bin/activate && \
make deps
deps:
pip install -r requirements.txt
clean:
./manage.py clean
find . | grep -E "(__pycache__|\.pyc|\.DS_Store|\.db|\.pyo$\)" | xargs rm -rf
lint:
flake8 --exclude=env,tests .
test:
py.test --cov-report term-missing --cov=server tests/
docker-test:
docker-compose -f docker/docker-compose.yml -f docker/docker-compose.test.yml run --rm web
docker-build:
find . | grep -E "(__pycache__|\.pyc|\.DS_Store|\.db|\.pyo$\)" | xargs rm -rf
docker build -t cs61a/ok-server .