Files
geointel/geointel/scripts/backend_test.sh
T
Jens 21015757bd
GeoIntel release gates / Compile, test, contracts and builds (push) Canceled after 0s
GeoIntel release gates / Python and npm vulnerability policy (push) Canceled after 0s
GeoIntel release gates / GIS image, SBOM and container scan (push) Canceled after 0s
Update
2026-07-27 23:13:09 +02:00

28 lines
1.1 KiB
Bash

#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/../backend"
if [ ! -d .venv ]; then
if command -v python3 >/dev/null 2>&1 && python3 -m pytest --version >/dev/null 2>&1; then
PYTHON_BIN="python3"
elif command -v python >/dev/null 2>&1 && python -m pytest --version >/dev/null 2>&1; then
PYTHON_BIN="python"
elif command -v python.exe >/dev/null 2>&1 && python.exe -m pytest --version >/dev/null 2>&1; then
PYTHON_BIN="python.exe"
else
echo "No python interpreter with pytest available" >&2
exit 1
fi
"${PYTHON_BIN}" -m pytest --version >/dev/null 2>&1 || "${PYTHON_BIN}" -m pip install -e .[dev]
fi
if command -v python3 >/dev/null 2>&1 && python3 -m pytest --version >/dev/null 2>&1; then
PYTHON_BIN="python3"
elif command -v python >/dev/null 2>&1 && python -m pytest --version >/dev/null 2>&1; then
PYTHON_BIN="python"
elif command -v python.exe >/dev/null 2>&1 && python.exe -m pytest --version >/dev/null 2>&1; then
PYTHON_BIN="python.exe"
else
echo "No python interpreter with pytest available" >&2
exit 1
fi
"${PYTHON_BIN}" -m pytest