idea149-deltax-forge-cross/test.sh

25 lines
552 B
Bash

#!/usr/bin/env bash
set -euo pipefail
# Build and test DeltaX-Forge project
# Steps:
# 1) Build sdist+wheel
# 2) Install the produced wheel into a clean environment
# 3) Run test suite
echo "[CI] Building distribution..."
python3 -m build
echo "[CI] Installing built wheel..."
# Find the produced wheel and install it
WHEEL=$(ls dist/*.whl | head -n 1)
if [[ -z "$WHEEL" ]]; then
echo "No wheel found in dist/; aborting." >&2
exit 1
fi
python3 -m pip install --upgrade pip
python3 -m pip install "$WHEEL"
echo "[CI] Running tests..."
pytest -q