-
Notifications
You must be signed in to change notification settings - Fork 22
/
Makefile
37 lines (29 loc) · 926 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
.DEFAULT_GOAL := test
PYTHON := python3
.PHONY: venv
venv:
bin/venv_update.py \
venv= -p $(PYTHON) venv \
install= -r requirements-dev.txt -rrequirements.txt \
bootstrap-deps= -r requirements-bootstrap.txt \
>/dev/null
venv/bin/pre-commit install --install-hooks
# Non-necessary dev environment tooling
.PHONY: venv-dev
venv-dev: venv
venv/bin/pip install ipython pudb pytest-sugar pytest-testmon pytest-watch
.PHONY: test
test: venv
venv/bin/coverage run -m pytest --strict tests/
venv/bin/coverage report --fail-under 64 --omit 'tests/*'
venv/bin/coverage report --fail-under 100 --include 'tests/*'
venv/bin/pre-commit run --all-files
# On TravisCI, test dependencies are pinned against against xenial python 3.7
.PHONY: test-ci
test-ci: PYTHON = python3.7
test-ci: test
venv/bin/check-requirements
.PHONY: clean
clean: ## Clean working directory
find . -iname '*.pyc' | xargs rm -f
rm -rf ./venv