flow2 / scripts /verify_all.sh
AndrianBalanescu
feat(agentic): add offline test suite, agent contracts, and unified verification runner
d863d16
Raw History Blame Contribute Delete
1.76 kB
#!/usr/bin/env bash
# scripts/verify_all.sh — Unified verification runner for autonomous agents
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROOT_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
cd "${ROOT_DIR}"
echo "========================================================"
echo " [1/3] Verifying Python syntax across all core modules..."
echo "========================================================"
python3 -m py_compile app.py
python3 -m py_compile moldovan-qwen/studio_server.py
python3 -m py_compile moldovan-qwen/engine/audio_synthesizer.py
python3 -m py_compile moldovan-qwen/engine/lyricist_engine.py
python3 -m py_compile moldovan-qwen/engine/model_dispatcher.py
python3 -m py_compile moldovan-qwen/linguistics/dialect_converter.py
python3 -m py_compile moldovan-qwen/personas/persona_engine.py
echo " Syntax check passed."
echo "========================================================"
echo " [2/3] Running pytest unit & integration test suite..."
echo "========================================================"
export HF_SKIP_PRELOAD=1
export TESTING=1
python3 -m pytest tests/ -v --tb=short
echo "========================================================"
echo " [3/3] Verifying mock API health & status..."
echo "========================================================"
python3 -c "
from app import fastapi_app
from fastapi.testclient import TestClient
c = TestClient(fastapi_app)
r = c.get('/v1/health')
assert r.status_code == 200, f'Health check failed: {r.text}'
print(' ZeroGPU OpenAPI Hub status: HEALTHY (200 OK)')
"
echo "========================================================"
echo " ALL CHECKS PASSED. Ready for agent commit or deployment."
echo "========================================================"