#!/usr/bin/env bash
set -euo pipefail

echo "=== Star Freight verify ==="

echo "[1/4] Lint: pyproject.toml"
python -c "import tomllib; tomllib.load(open('pyproject.toml','rb'))"

echo "[2/4] Tests"
python -m pytest tests/ --ignore=tests/test_tui_voyage_legacy.py -x -q

echo "[3/4] Build"
python -m build --wheel --sdist 2>/dev/null || echo "SKIP: build module not installed"

echo "[4/4] Import smoke"
python -c "from portlight.engine.sf_campaign import CampaignState; print('OK:', CampaignState())"

echo ""
echo "=== verify PASS ==="
