algograph-algebraic-portfol.../test.sh

19 lines
600 B
Bash

#!/usr/bin/env bash
set -euo pipefail
# Ensure Python imports from our source tree
# Guard against unbound PYTHONPATH when running with 'set -u'.
# If PYTHONPATH is already set, prepend our src directory; otherwise just use src.
export PYTHONPATH="${PWD}/src:${PYTHONPATH:-}"
echo "Running Python tests..."
echo "Installing package dependencies..."
python3 -m pip install --upgrade pip setuptools wheel >/dev/null 2>&1 || true
python3 -m pip install -e . >/dev/null 2>&1 || true
pytest -q
echo "Building package (verification step)…"
python3 -m build
echo "All tests passed and package built."