#!/usr/bin/env bash set -euo pipefail if [[ -z "${ASTRO_EPHEMERIS_DIR:-}" ]]; then echo "ASTRO_EPHEMERIS_DIR is required" >&2 exit 2 fi if [[ ! -f "${ASTRO_EPHEMERIS_DIR}/de440.bsp" ]]; then echo "missing ${ASTRO_EPHEMERIS_DIR}/de440.bsp" >&2 exit 2 fi python -c "import swisseph" >/dev/null 2>&1 || { echo "pyswisseph is required" >&2; exit 2; } REPORT_DIR="${ASTRO_VALIDATION_REPORT_DIR:-validation/reports/ci_latest}" mkdir -p "${REPORT_DIR}" PYTHONPATH="$(pwd)" pytest -q PYTHONPATH="$(pwd)" python -m validation.run_ci_gates --report-dir "${REPORT_DIR}" --ephemeris-dir "${ASTRO_EPHEMERIS_DIR}" --seed 1 echo "reports_written=${REPORT_DIR}"