#!/usr/bin/env bash set -euo pipefail echo "=== CatOpt MVP CI: build and tests ===" # Ensure we are at repo root ROOT_DIR=$(cd "$(dirname "$0")" && pwd) cd "$ROOT_DIR" echo "[Step 1/2] Building distribution wheel..." python3 -m build >/tmp/catopt_build.log 2>&1 || { echo "Build failed. See /tmp/catopt_build.log for details."; exit 1; } echo "Build completed. (see /tmp/catopt_build.log)" echo "[Step 2/2] Running tests..." pytest -q || { echo "Tests failed. See pytest output above for details."; exit 1; } echo "All tests passed."