-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
76 lines (55 loc) · 1.69 KB
/
Makefile
File metadata and controls
76 lines (55 loc) · 1.69 KB
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
# ************************************************
# ********** application **********
# ************************************************
.PHONY: run.dev # run the application in a dev mode
run.dev:
# NOTE:configurable via environment variables
uvicorn src.main:app
.PHONY: run.compose # run the application in a dev mode
run.compose:
docker compose up -d cache
# *************************************************
# ********** tests **********
# *************************************************
.PHONY: tests # run all tests
tests:
python -m pytest -vvv ./tests
.PHONY: tests.unit # run unit tests
tests.unit:
python -m pytest -vvv -x ./tests/unit
.PHONY: tests.integration # run integration tests
tests.integration:
python -m pytest -vvv -x ./tests/integration
# *************************************************
# ********** code quality **********
# *************************************************
.PHONY: fix # fix formatting / and order imports
fix:
python -m black .
python -m isort .
python -m ruff --fix .
.PHONY: check.types # check type annotations
check.types:
python -m mypy --check-untyped-defs .
.PHONY: check # check everything
check:
python -m ruff .
python -m black --check .
python -m isort --check .
python -m mypy --check-untyped-defs .
python -m pytest -vvv -x ./tests
# *************************************************
# ********** other **********
# *************************************************
.PHONY: backend.run
backend.run:
docker compose up -d
.PHONY: backend.status
backend.status:
docker compose logs --tail 100 app
.PHONY: backend.update
backend.update:
docker compose build --no-cache
.PHONY: backend.stop
backend.stop:
docker compose down