forked from votingworks/arlo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (38 loc) · 1.02 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
deps:
sudo apt install python3.8 python3-pip nodejs libpython3.8-dev libpq-dev
python3.8 -m pip install pipenv
sudo npm install -g yarn
sudo apt install postgresql
# this should only be used for development
initdevdb:
sudo -u postgres psql -c "create user arlo superuser password 'arlo';"
sudo -u postgres psql -c "create database arlo with owner arlo;"
install:
pipenv install
yarn install
yarn --cwd client install
yarn --cwd client build
install-development:
pipenv install --dev
yarn install
yarn --cwd client install
resettestdb:
FLASK_ENV=test make resetdb
resetdb:
FLASK_ENV=$${FLASK_ENV:-development} pipenv run python -m scripts.resetdb
dev-environment: deps initdevdb install-development resetdb
typecheck-server:
pipenv run mypy server scripts
format-server:
pipenv run black .
lint-server:
pipenv run pylint -j 0 server scripts
test-client:
yarn --cwd client lint
yarn --cwd client test
test-server:
pipenv run pytest -n 2
test-server-coverage:
pipenv run pytest -n 2 --cov=.
run-dev:
./run-dev.sh