forked from mrlac1/test-backend-junior
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
84 lines (61 loc) · 1.17 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
include .env
export
####################
# Setup tasks #
####################
install_dev:
pip install -e ".[dev]"
install_ci:
pip install -e ".[ci]"
install:
pip install .
setup_venv:
python3.10 -m venv venv
setup_dev: setup_venv
(\
. venv/bin/activate;\
pip install -e ".[dev]";\
)
setup: setup_venv
(\
. venv/bin/activate;\
pip install .;\
)
####################
# Migration #
####################
migrate:
yoyo apply
rollback:
yoyo rollback
reset_db:
yoyo rollback --all
yoyo apply
list_migrations:
yoyo list
####################
# Testing #
####################
test:
pytest -vvv -x tests
test-no-integ:
pytest -vvv -x --ignore=tests/integration tests/
test-integ-only:
pytest -vvv -x tests/integration
lint:
flake8 boy.py app
mypy --install-types --non-interactive boy.py app
cover:
coverage run --source=app,v2 -m pytest --ignore=tests/integration -xv tests
coverage-report: cover
coverage report -m --skip-empty
coverage-gutter: cover
coverage html --skip-empty -d coverage
coverage xml --skip-empty
bandit:
bandit -r app boy.py
bandit-ci:
bandit -r -ll -ii app boy.py
test-all: lint test bandit
run:
python boy.py