Files
viessm_h 80c05944d0
ci / test (push) Failing after 20s
fix final test runs in ci
2026-11-19 14:43:16 +01:00

46 lines
1.6 KiB
Makefile

# merlin-hpc-mcp - developer tasks
#
# Requirements: uv (https://docs.astral.sh/uv/), GNU make.
#
# Keep UPSTREAM_TAG in sync with the pin in pyproject.toml. It is not used by
# default tasks; it documents intent for reviewers.
UPSTREAM_TAG ?= 0.2.1
.DEFAULT_GOAL := help
.PHONY: help sync fmt lint typecheck test check-upstream
help: ## List available tasks
@grep -E '^[a-zA-Z_-]+:.*?## ' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-16s\033[0m %s\n", $$1, $$2}'
sync: ## Resolve/refresh the environment (uses the pinned cluster-mcp tag)
uv sync --all-packages --dev
fmt: ## Auto-format everything
uv run ruff format .
uv run ruff check --fix .
lint: ## Lint
uv run ruff check .
typecheck: ## Type-check (advisory while upstream ships no stubs)
uv run --all-packages mypy packages
test: ## Run the test suite
uv run --all-packages pytest
# Advisory drift check: resolve cluster-mcp from upstream main, run the full
# test suite against it, then restore the pinned pyproject. Never leaves the
# pin modified. A non-zero exit means upstream main disagrees with us:
# triage per docs/upstream-policy.md *before* the next planned upgrade.
check-upstream: ## Test the workspace against upstream cluster-mcp main
sed -i.bak -E 's/tag = "[0-9.]+"/branch = "main"/' pyproject.toml
uv lock --upgrade-package cluster-mcp && uv sync --dev && uv run --all-packages pytest; status=$$?; \
mv pyproject.toml.bak pyproject.toml; \
if [ $$status -eq 0 ]; then \
echo "OK: workspace is clean against upstream main."; \
else \
echo "DRIFT: upstream main breaks us. Triage per docs/upstream-policy.md."; \
fi; \
exit $$status