-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
45 lines (35 loc) · 1.04 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
.PHONY: help
help: ## Show this help
@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
.PHONY: build
build: ## Build project with compose
docker-compose build
.PHONY: up
up: ## Run project with compose
docker-compose up
.PHONY: down
down: ## Reset project containers with compose
docker-compose down -v --remove-orphans
.PHONY: test
test: ## Run project tests
docker-compose run --rm web pytest -vv
.PHONY: test-snapshot
test-snapshot: ## Run project tests
docker-compose run --rm web pytest -vv --inline-snapshot=create
.PHONY: mypy
mypy: ## mypy check.
mypy --ignore-missing-imports .
.PHONY: lint
lint: ## Lint project code.
poetry run ruff check --fix .
.PHONY: safety
safety: ## apply safety check in project.
safety check
.PHONY: format
format: ## format project code.
black --line-length=120 .
isort -rc -m 3 --tc .
.PHONY: clean
clean: ## Clean Reset project containers and volumes with compose
docker-compose down -v --remove-orphans | true
docker-compose rm -f