-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
32 lines (22 loc) · 859 Bytes
/
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
.DEFAULT_GOAL := help
DOCKER_IMAGE = networktocode/ntc-soteria
DOCKER_VER = 0.0.1
.PHONY: help
help:
@grep '^[a-zA-Z]' $(MAKEFILE_LIST) | \
sort | \
awk -F ':.*?## ' 'NF==2 {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}'
build: ## Build Docker container.
docker build -t $(DOCKER_IMAGE):$(DOCKER_VER) .
flake8: ## Python linting via Flake8.
find . -name '*.py' -exec flake8 {} +
yamllint: ## YAML linting via Yamllint.
find \( -name *.yaml -o -name *.yml \) | xargs yamllint -d "{ignore: docker-compose.yml}"
black: ## Format checking via Black.
black --check .
pytest: ## Unit tests via Pytest.
pytest -vvv
bandit: ## Security checks via Bandit.
bandit --recursive --config .bandit.yml .
tests: flake8 yamllint black pytest bandit ## Format, lint, security and unit tests
# :%s/^[ ]\+/\t/g - automatically replace all tabs with spaces