-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
41 lines (25 loc) · 852 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
PYTHON ?= python3
PIP ?= $(PYTHON) -m pip
COVERAGE ?= coverage
config:
$(PIP) install pycodestyle
$(PIP) install coverage
$(PIP) install flake8
$(PIP) install -r requirements.txt
lint-pycodestyle:
@echo "\n==> Pycodestyle Linting:"
@find app -type f -name \*.py | while read file; do echo "$$file" && pycodestyle --config=./pycodestyle --first "$$file" || exit 1; done
lint-flake8:
@echo "\n==> Flake8 Linting:"
@find app -type f -name \*.py | while read file; do echo "$$file" && flake8 --config=flake8.ini "$$file" || exit 1; done
lint: lint-pycodestyle lint-flake8
@echo "\n==> All linting cases passed!"
test:
@echo "\n==> Run Test Cases:"
$(PYTHON) manage.py test
coverage:
$(COVERAGE) run --source='.' manage.py test app
$(COVERAGE) report -m
ci: test coverage lint
@echo "\n==> All quality checks passed"
.PHONY: ci