diff --git a/test.sh b/test.sh index f81ff47..156f82e 100755 --- a/test.sh +++ b/test.sh @@ -1,10 +1,22 @@ #!/usr/bin/env bash set -euo pipefail -echo "Running build to verify packaging..." -python3 -m build --wheel --no-isolation +echo "=== CatOpt MVP CI: build and tests ===" -echo "Running tests..." -pytest -q +# 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."