-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (42 loc) · 1.62 KB
/
Copy pathMakefile
File metadata and controls
60 lines (42 loc) · 1.62 KB
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
.PHONY: test smoke unit functional security pentest demo lint types sast audit cover counts qa clean
# ------------------------------------------------------------------ the tiers
# Each answers a different question. See docs/TEST_STRATEGY.md.
test:
python -m pytest
smoke:
python -m pytest -m smoke
unit:
python -m pytest -m unit
functional:
python -m pytest -m functional
security:
python -m pytest -m security
pentest:
python -m pytest -m pentest
# ------------------------------------------------------------------- the demo
# Twelve nodes, three waves, four planted failures. It must always print
# 2 rolled back and 6 untouched; a change in that output is a regression until
# somebody says otherwise, and tests/functional pins it.
demo:
python -m fleet_ops.cli demo --out ./run/rollout.json
# ------------------------------------------------------------------- the gate
# `make qa` is what CI runs. Everything in it fails the build; nothing prints a
# warning and continues, because a warning nobody must act on is unread.
lint:
python -m ruff check src tests scripts
types:
python -m mypy
sast:
python -m bandit -q -r src
audit:
python -m pip_audit --progress-spinner off
# A count written next to a command is stale the moment somebody adds a test.
# This is the only part of the gate that reads the documentation.
counts:
python scripts/check_documented_counts.py
cover:
python -m pytest --cov=fleet_ops --cov-report=term-missing --cov-fail-under=90
qa: lint types sast audit counts cover
clean:
rm -rf run .pytest_cache .mypy_cache .ruff_cache .coverage htmlcov
find . -name __pycache__ -type d -exec rm -rf {} +