forked from christianhujer/expensereport
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
54 lines (40 loc) · 1.16 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
export PATH:=./venv/bin/:$(PATH)
.PHONY: all
all: verify
.PHONY: verify
verify: lint test
.PHONY: pipeline
pipeline: pip-install verify
.PHONY: pip-install
pip-install:
pip install -r requirements.txt
.PHONY: test
test: .coverage
.PHONY: lint
lint:
mypy *.py
prospector *.py
coverage-reports/unit-test.coverage:
COVERAGE_FILE=$@ coverage run --omit "venv/*" -m unittest discover
coverage-reports/acceptance-test.coverage:
COVERAGE_FILE=$@ coverage run --omit "venv/*" -m behave
.coverage: coverage-reports/acceptance-test.coverage coverage-reports/unit-test.coverage
coverage combine coverage-reports/*.coverage
coverage report --fail-under 100.0
coverage-reports/coverage-.xml: .coverage
coverage xml -o coverage-reports/coverage-.xml
.PHONY: sonarqube
sonarqube: coverage-reports/coverage-.xml
docker run --network host --rm -v "$$(pwd):/usr/src" sonarsource/sonar-scanner-cli -Dsonar.projectKey=gameoflife-python
.PHONY: sonard
## Runs a Sonar server locally.
sonard:
docker start sonarqube || docker run -d --name sonarqube sonarqube
.PHONY: checkUpdates
checkUpdates:
pip list --outdated
.PHONY: clean
clean::
coverage erase
clean::
$(RM) -r coverage-reports