-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (18 loc) · 715 Bytes
/
Makefile
File metadata and controls
26 lines (18 loc) · 715 Bytes
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
PYTHON?=.venv/bin/python
PIP?=.venv/bin/pip
.PHONY: venv install dev test apply-schema seeds ci
venv:
python3 -m venv .venv
$(PIP) install -U pip
install: venv
$(PIP) install -r requirements.txt
apply-schema:
PGPASSWORD=$(DB_PASSWORD) psql -h $(DB_HOST) -p $(DB_PORT) -U $(DB_USER) -d $(DB_NAME) -v ON_ERROR_STOP=1 -f src/backend/app/db/schema.sql
seeds:
PGPASSWORD=$(DB_PASSWORD) psql -h $(DB_HOST) -p $(DB_PORT) -U $(DB_USER) -d $(DB_NAME) -v ON_ERROR_STOP=1 -f src/backend/app/db/seeds/initial.sql
dev: install
bash scripts/dev_run.sh
test: install
APP_ENV=test .venv/bin/pytest -q --cov=src/backend --cov-report=term-missing
ci:
APP_ENV=ci .venv/bin/pytest -q --cov=src/backend --cov-report=xml