-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (40 loc) · 1.27 KB
/
Makefile
File metadata and controls
51 lines (40 loc) · 1.27 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
.PHONY: install test test-python test-terraform test-all lint format security semgrep clean
install:
uv sync --locked --group dev --group lint
cd tests/terraform && go mod tidy && go mod download
test: install lint test-python
test-all: install lint test-python test-terraform
test-python: install
. $(PWD)/test.env && uv run pytest tests/ops/
test-terraform: install
cd tests/terraform && PATH="$(PWD)/.venv/bin:$$PATH" go test -v -timeout 30m
test-coverage:
. $(PWD)/test.env && uv run pytest \
--cov=ops \
--cov-report=term-missing \
--cov-report=html \
tests/ops/
lint:
uv run ruff check ops/ tests/
uv run black --check ops/ tests/
cd tests/terraform && go vet ./...
cd tests/terraform && gofmt -d .
format:
uv run black ops/ tests/
uv run ruff check --fix ops/ tests/
cd tests/terraform && gofmt -w .
security:
uvx bandit -i -s B101,B311 -r ops/ tests/
semgrep:
uvx semgrep --error --verbose --config p/security-audit ops/ tests/
clean:
rm -rf .pytest_cache/
rm -rf .ruff_cache/
rm -rf htmlcov/
rm -rf build/
rm -rf dist/
rm -rf .coverage*
find . -name "*.pyc" -delete
find . -name "__pycache__" -type d -exec rm -rf {} + 2>/dev/null || true
find . -name "*.egg-info" -type d -exec rm -rf {} + 2>/dev/null || true
cd tests/terraform && go clean -testcache