-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (44 loc) · 1.53 KB
/
Makefile
File metadata and controls
63 lines (44 loc) · 1.53 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
.PHONY: tests_unit tests_integration
.DEFAULT_GOAL := run_all
UNIT_TEST ?= tests_unit/middleware/test_request_id.py::test_new_request_id_when_not_supplied_in_request
INTEGRATION_TEST ?= tests_integration/test_main.py::test_root_get
init:
uv sync --locked
init_dependencies:
uv sync
init_ci:
pip install uv --upgrade
uv sync --locked
fast_dev:
uv run fastapi dev app/main.py
fast_run:
uv run fastapi run app/main.py
tests_unit:
uv run pytest -vvvvv --html=tests_unit_report.html --self-contained-html tests_unit
tests_unit_specific:
uv run pytest -vvvvv --setup-show --html=tests_unit_specific_report.html --self-contained-html $(UNIT_TEST)
tests_integration:
uv run pytest -vvvvv --html=tests_integration_report.html --self-contained-html tests_integration
tests_integration_specific:
uv run pytest -vvvvv --setup-show --html=tests_integration_specific_report.html --self-contained-html $(INTEGRATION_TEST)
upgrade:
uv sync --upgrade
ruff:
uv run ruff check --fix
uv run ruff format
flake8:
uv run flake8 --ignore=E501 --exclude=.venv,.git # ignore max line length
run_all:
make init ruff flake8 tests_unit tests_integration
docker_compose_pull:
docker compose -f docker-compose.yml pull
docker_compose_start:
docker compose -f docker-compose.yml up --build -d
docker_compose_stop:
docker compose -f docker-compose.yml down -v
docker_compose_restart:
make docker_compose_stop docker_compose_start
fast_dev_docker_compose_restart:
make docker_compose_restart fast_dev
docker:
docker build --pull -t python-fastapi -f Dockerfile .