-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (39 loc) · 1.54 KB
/
Makefile
File metadata and controls
50 lines (39 loc) · 1.54 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
# ibctl development targets
PYTHON := python
TOOLS := tools
DASHBOARD := dashboard
# --- Config generation ---
.PHONY: generate-configs check-configs preflight test-preflight test-rust test
## Regenerate all config artifacts from Pkl schema.
## Run this after editing any file in config/pkl/.
generate-configs:
@echo "Generating config artifacts from Pkl schema..."
$(PYTHON) $(TOOLS)/generate_configs.py --target all
$(PYTHON) $(TOOLS)/generate_configs.py --profile live --target compose
$(PYTHON) $(TOOLS)/generate_configs.py --profile both --target compose
$(PYTHON) $(TOOLS)/generate_configs.py --profile dashboard --target compose
@echo "All artifacts regenerated."
## Check that generated files are in sync with Pkl source.
## Exits non-zero if drift is detected. Use in CI.
check-configs: generate-configs
@if git diff --quiet docker/ibctl.toml ibctl.toml.example examples/; then \
echo "Config files are in sync."; \
else \
echo "DRIFT DETECTED: generated files differ from Pkl source."; \
echo "Run 'make generate-configs' and commit the result."; \
git diff --stat docker/ibctl.toml ibctl.toml.example examples/; \
exit 1; \
fi
# --- Validation ---
## Run pre-flight config validation against docker/ibctl.toml.
preflight:
cd $(DASHBOARD) && $(PYTHON) -m app.preflight --config ../docker/ibctl.toml --no-env
# --- Tests ---
## Run pre-flight Python tests.
test-preflight:
cd $(DASHBOARD) && $(PYTHON) -m pytest tests/test_preflight.py -v
## Run Rust tests.
test-rust:
cargo test
## Run all tests.
test: test-rust test-preflight