-
Notifications
You must be signed in to change notification settings - Fork 424
/
Copy pathMakefile
34 lines (24 loc) · 869 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
.PHONY: all pre-commit mypy test test-cov-html test-cov-xml
CMD:=python -m
PYMODULE:=pyrit
TESTS:=tests
UNIT_TESTS:=tests/unit
INTEGRATION_TESTS:=tests/integration
all: pre-commit
pre-commit:
$(CMD) isort --multi-line 3 --recursive $(PYMODULE) $(TESTS)
pre-commit run --all-files
mypy:
$(CMD) mypy $(PYMODULE) $(UNIT_TESTS)
docs-build:
jb build -W -v ./doc
unit-test:
$(CMD) pytest --cov=$(PYMODULE) $(UNIT_TESTS)
unit-test-cov-html:
$(CMD) pytest --cov=$(PYMODULE) $(UNIT_TESTS) --cov-report html
unit-test-cov-xml:
$(CMD) pytest --cov=$(PYMODULE) $(UNIT_TESTS) --cov-report xml --junitxml=junit/test-results.xml --doctest-modules
integration-test:
$(CMD) pytest $(INTEGRATION_TESTS) --cov=$(PYMODULE) $(INTEGRATION_TESTS) --cov-report xml --junitxml=junit/test-results.xml --doctest-modules
#clean:
# git clean -Xdf # Delete all files in .gitignore