-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
86 lines (73 loc) · 1.84 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
COLOR ?= auto
PYTEST_FLAGS ?= -v
PYTEST_PARALLEL ?= auto # overwritten in CI
.PHONY: setup
setup:
pip install -r requirements/test.txt
pre-commit install
.PHONY: lint
lint: format
mypy apolo_extras tests setup.py
.PHONY: format
format:
pre-commit run --all-files --show-diff-on-failure
.PHONY: test_e2e
test_e2e:
pytest -n $(PYTEST_PARALLEL) $(PYTEST_FLAGS) -m "(not serial) and (not smoke_only)" \
--color=$(COLOR) tests/e2e
pytest -n 0 $(PYTEST_FLAGS) -m "serial and (not smoke_only)" \
--color=$(COLOR) tests/e2e
.PHONY: test_smoke
test_smoke: test_unit test_e2e_smoke
.PHONY: test_e2e_smoke
test_e2e_smoke:
pytest -n $(PYTEST_PARALLEL) \
$(PYTEST_FLAGS) \
-m "(not serial) and smoke" \
--color=$(COLOR) \
--runxfail \
tests/e2e
pytest -n 0 \
$(PYTEST_FLAGS) \
-m "serial and smoke" \
--color=$(COLOR) \
--runxfail \
tests/e2e
.PHONY: test_data
test_data:
pytest -n $(PYTEST_PARALLEL) \
$(PYTEST_FLAGS) \
-k "not serial and not smoke_only" \
--color=$(COLOR) \
tests/e2e/data
pytest -n 0 \
$(PYTEST_FLAGS) \
-k "serial and not smoke_only" \
--color=$(COLOR) \
tests/e2e/data
.PHONY: test_image
test_image:
pytest -n $(PYTEST_PARALLEL) \
$(PYTEST_FLAGS) \
-k "not serial and not smoke_only" \
--color=$(COLOR) \
tests/e2e/test_image.py
pytest -n 0 \
$(PYTEST_FLAGS) \
-k "serial and not smoke_only" \
--color=$(COLOR) \
tests/e2e/test_image.py
.PHONY: test
test: test_unit test_e2e
.PHONY: test_unit
test_unit:
pytest $(PYTEST_FLAGS) --color=$(COLOR) tests/unit
.PHONY: changelog-draft
changelog-draft:
towncrier --draft --name `python setup.py --name` --version v`python setup.py --version`
.PHONY: changelog
changelog:
towncrier --name `python setup.py --name` --version v`python setup.py --version`
.PHONY: docs
docs:
build-tools/cli-help-generator.py CLI.in.md docs/cli.md