20 lines
558 B
Bash
20 lines
558 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
echo "[Test] Setting up Python build environment..."
|
|
python3 -m venv venv
|
|
source venv/bin/activate
|
|
python -m pip install --upgrade pip
|
|
python -m pip install --upgrade build wheel setuptools
|
|
|
|
echo "[Test] Installing package in editable mode for tests"
|
|
pip install -e .
|
|
pip install --upgrade pytest
|
|
echo "[Test] Running unit tests (unittest discover)"
|
|
pytest -q || (echo "Tests failed"; exit 1)
|
|
|
|
echo "[Test] Building package with python -m build..."
|
|
python3 -m build
|
|
|
|
echo "[Test] All tests passed and package built."
|