-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
111 lines (89 loc) · 1.68 KB
/
Copy pathMakefile
File metadata and controls
111 lines (89 loc) · 1.68 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
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
.PHONY: \
lock \
install \
format \
format-check \
lint \
typecheck \
quality \
test \
test-unit \
test-integration \
test-e2e \
require-shells \
cov \
check \
bench \
build \
smoke \
build-check \
release-check \
docker \
docker-check \
clean
lock:
poetry lock
install:
poetry install
format:
poetry run ruff check --fix .
poetry run ruff format .
format-check:
poetry run ruff format --check .
lint:
poetry run ruff check .
typecheck:
poetry run mypy src tests benchmarks
quality: format-check lint typecheck
test:
poetry run pytest
test-unit:
poetry run pytest tests/unit
test-integration:
poetry run pytest tests/integration
test-e2e:
poetry run pytest tests/e2e
require-shells:
@for shell in bash zsh fish; do \
command -v "$$shell" >/dev/null || { \
printf 'Required shell is missing: %s\n' "$$shell" >&2; exit 1; \
}; \
done
cov:
poetry run pytest \
--cov=pcd_cli \
--cov-branch \
--cov-report=term-missing \
--cov-report=html \
--cov-fail-under=95
check: quality cov
bench:
poetry run pytest benchmarks -q -s
build:
rm -rf dist
poetry build
smoke:
rm -rf .smoke
poetry run python -m venv .smoke
.smoke/bin/python -m pip install dist/*.whl
.smoke/bin/python -I tests/smoke_wheel.py "$$(poetry version --short)"
rm -rf .smoke
build-check: build
$(MAKE) smoke
release-check: require-shells check build-check
docker:
docker build --tag pcd-cli:local .
docker-check: docker
docker run --rm pcd-cli:local --version
docker run --rm pcd-cli:local --help
clean:
rm -rf \
build \
dist \
htmlcov \
.coverage \
.pytest_cache \
.mypy_cache \
.ruff_cache \
.smoke
find . -type d -name __pycache__ -prune -exec rm -rf {} +