-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
43 lines (35 loc) · 1023 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
33
34
35
36
37
38
39
40
41
42
43
# Default container tag
CONT_TAG=suse/qac/pcw
LINE_MAX=140
FILES=ocw/lib/*.py ocw/management/commands/*.py ocw/*.py *.py
.PHONY: all
all: prepare flake8 test pylint
.PHONY: prepare
prepare:
pip install -r requirements_test.txt
.PHONY: pylint
pylint:
pylint $(FILES)
.PHONY: flake8
flake8:
flake8 --max-line-length=$(LINE_MAX) $(FILES) tests/*.py
.PHONY: test
test:
pytest --cov
.PHONY: codecov
codecov:
pytest -v --cov --cov-report=html && xdg-open htmlcov/index.html
# Build containers
.PHONY: container container-devel container-k8s container-k8s-devel
container:
podman build . -t ${CONT_TAG} -f containers/Dockerfile
container-devel:
podman build . -t ${CONT_TAG}-devel -f containers/Dockerfile_dev
container-k8s:
podman build . -t ${CONT_TAG}-k8s-cleaner -f containers/Dockerfile_k8s
container-k8s-devel:
podman build . -t ${CONT_TAG}-k8s-cleaner-devel -f containers/Dockerfile_k8s_dev
# Container linting
.PHONY: container-lint
container-lint: containers/Dockerfile*
hadolint containers/Dockerfile*