-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (35 loc) · 845 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
PYTHON = python3
VENV = venv
ACTIVATE := . $(VENV)/bin/activate
# Write a marker .install file to indicate that the dependencies have been
# installed.
INST := $(VENV)/.install
$(INST): requirements.txt
$(PYTHON) -m venv $(VENV)
$(ACTIVATE); pip install --upgrade pip
$(ACTIVATE); pip install -r requirements.txt
touch $@
.PHONY: install
install: $(INST)
.PHONY: clean
clean:
rm -rf __pycache__ venv
.PHONY: fmt
fmt: install
$(ACTIVATE); black ./
.PHONY: lint
lint: install
$(ACTIVATE); pylint src/
.PHONY: types
types: install
$(ACTIVATE); mypy src/ --strict
.PHONY: check
check: fmt lint types
.PHONY: test-unit
test-unit: install
$(ACTIVATE); python -m pytest tests/unit
.PHONY: test-e2e
test-integration: install
$(ACTIVATE); python -m pytest tests/integration
.PHONY: test-all
test-all: test-unit test-integration