Files
skills/phased-execution/assets/validate.sh
T
2026-08-21 02:30:51 -04:00

25 lines
631 B
Bash
Executable File

#!/usr/bin/env bash
# .agent/validate.sh — validation gate for the phased-execution pipeline.
#
# A phase is only moved to .agent/phases/complete/ if this script exits 0.
# Adapt the checks below to this project's real test suite, linter, and
# coverage floor, then commit the result.
set -uo pipefail
rc=0
if [[ -f pyproject.toml || -f pytest.ini || -f setup.py ]]; then
python3 -m pytest -q || rc=1
if command -v ruff >/dev/null 2>&1; then
ruff check . || rc=1
fi
fi
if [[ -f package.json ]]; then
npm test --silent || rc=1
fi
if [[ $rc -ne 0 ]]; then
echo "validation FAILED (see output above)"
fi
exit "$rc"