-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
48 lines (38 loc) · 965 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
44
45
46
47
48
# Python interpreter. Default: '$(PYTHON)'
PYTHON ?= python
PIP ?= pip
# BEGIN-EVAL makefile-parser --make-help Makefile
help:
@echo ""
@echo " Targets"
@echo ""
@echo " install Install this package"
@echo " deps Install dependencies only"
@echo " deps-test Install dependencies for testing only"
@echo " test Run all unit tests"
@echo " coverage Run coverage tests"
@echo ""
@echo " Variables"
@echo ""
@echo " PYTHON Python interpreter. Default: '$(PYTHON)'"
@echo " PIP Python packager. Default: '$(PIP)'"
# END-EVAL
#
# Tests
#
.PHONY: install test coverage deps deps-test
install:
$(PIP) install .
deps:
$(PIP) install -r requirements.txt
deps-test:
$(PIP) install -r requirements-test.txt
# Run all unit tests
test:
$(PYTHON) -m pytest --continue-on-collection-errors $(TESTDIR)
# Run coverage tests
coverage:
coverage erase
make test PYTHON="coverage run"
coverage report
coverage html