.PHONY: dev test lint build deploy-test smoke

dev:
	docker compose up -d
	@echo "Running at http://localhost:5556"

test:
	cd src/api && python -m pytest ../../tests/ -v
	@echo "Tests complete"

lint:
	cd src/api && python -m ruff check .
	@echo "Lint complete"

build:
	docker build -t enduro-trails:latest .

deploy-test:
	docker compose -f infra/compose/docker-compose.yml pull
	docker compose -f infra/compose/docker-compose.yml up -d
	@echo "Deployed to test"

smoke:
	curl -sf http://localhost:5556/health || (echo "SMOKE FAILED" && exit 1)
	@echo "Smoke OK"
