idea157-openfederatedcompil.../test.sh

21 lines
517 B
Bash

#!/usr/bin/env bash
set -euo pipefail
echo "== Running unit tests (pytest) =="
# Ensure pytest is available
if ! command -v pytest >/dev/null 2>&1; then
echo "pytest not found, installing..."
python3 -m pip install --upgrade pytest
fi
pytest -q
echo "== Building package with Python build tool =="
# Ensure build is available; install if missing
if ! python3 -m build --version >/dev/null 2>&1; then
echo "build package not found, installing..."
python3 -m pip install --upgrade build
fi
python3 -m build