-
Notifications
You must be signed in to change notification settings - Fork 199
/
Makefile
72 lines (59 loc) · 1.61 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
all: clean package
.PHONY: pre-requisites
pre-requisites:
@echo ----- Installing pre-requisites -----
poetry install --with dev --with docs --with test
.PHONY: lint
lint:
@echo ----- Running lint -----
poetry run flake8 kapitan
poetry run mypy kapitan
poetry run pylint kapitan
.PHONY: install poetry with pipx
install_poetry:
@echo ----- Installing poetry with pipx -----
which poetry || pipx install poetry
.PHONY: test
test: pre-requisites lint test_python test_docker test_coverage test_formatting
@echo ----- Running python tests -----
poetry run pytest
.PHONY: test_docker
test_docker:
@echo ----- Testing build of docker image -----
docker build . --no-cache -t kapitan
@echo ----- Testing run of docker image -----
docker run -ti --rm kapitan --help
docker run -ti --rm kapitan lint
.PHONY: test_coverage
test_coverage:
@echo ----- Testing code coverage -----
poetry run coverage run --source=kapitan -m pytest
poetry run coverage report --fail-under=65 -m
.PHONY: test_formatting
test_formatting:
@echo ----- Testing code formatting -----
poetry run black --check .
@echo
.PHONY: release
release:
ifeq ($(version),)
@echo Please pass version to release e.g. make release version=0.16.5
else
scripts/inc_version.sh $(version)
endif
.PHONY: package
package:
python3 setup.py sdist bdist_wheel
.PHONY: clean
clean:
rm -rf dist/ build/ kapitan.egg-info/ bindist/
.PHONY: format_codestyle
format_codestyle:
poetry run black .
@echo
.PHONY: local_serve_documentation
local_serve_documentation:
poetry run mike serve
.PHONY: mkdocs_gh_deploy
mkdocs_gh_deploy:
poetry run mike deploy --push dev master