replica-omnisciente/scripts/test-all.sh
Raphael Cautus (Maestro) 2f26f2d836 feat(scripts): onboarding, GWS, lifestream, muscriptor, music, data-sharing
- onboard-client.py: client replica scaffolding CLI
- gws/: Google Workspace sync (Gmail, Calendar, Drive)
- lifestream/: life event stream collector
- muscriptor-mcp/: audio → MIDI MCP server
- music-mcp/: music library MCP server
- data_sharing/: consent-gated data sharing (Python + TS)
- sync-mirrors.py: GitHub → Forgejo mirror engine
- brain-to-gbrain.py, vault-sync.py, test-all.sh
- shared/: TS data-sharing library + index
- dirac: provider registry update
- .gitignore: exclude Rust build artifacts

Co-authored-by: Álvaro de Campos <campos@portugalfuturista.org>
2026-07-31 14:58:02 +01:00

65 lines
2.3 KiB
Bash
Executable file

#!/usr/bin/env bash
# Unified test runner for replica-omnisciente monorepo
# Usage: ./scripts/test-all.sh [--vscode] [--backend] [--frontend] [--quick]
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
PASS=0
FAIL=0
SKIP=0
run_suite() {
local name="$1"
local dir="$2"
local cmd="$3"
echo ""
echo "══════════════════════════════════════"
echo " $name"
echo "══════════════════════════════════════"
if (cd "$dir" && eval "$cmd"); then
echo "$name PASSED"
PASS=$((PASS + 1))
else
echo "$name FAILED"
FAIL=$((FAIL + 1))
fi
}
# --- aurelio-vscode unit tests (mocha) ---
if [[ "${1:-}" != "--backend" && "${1:-}" != "--frontend" ]]; then
if [ -d "$ROOT/extensions/aurelio-vscode/node_modules/mocha" ]; then
run_suite "aurelio-vscode (unit)" "$ROOT/extensions/aurelio-vscode" \
"TS_NODE_PROJECT=./tsconfig.unit-test.json npx mocha"
else
echo "SKIP aurelio-vscode — run npm install first"
SKIP=$((SKIP + 1))
fi
fi
# --- aurelio-backend tests (node --test) ---
if [[ "${1:-}" != "--vscode" && "${1:-}" != "--frontend" ]]; then
if [ -d "$ROOT/aurelio-theia/aurelio-backend/node_modules" ]; then
run_suite "aurelio-backend" "$ROOT/aurelio-theia/aurelio-backend" \
"npx tsc -p tsconfig.json && npm test"
else
echo "SKIP aurelio-backend — run npm install --ignore-scripts first"
SKIP=$((SKIP + 1))
fi
fi
# --- dirac tests (mocha) ---
if [[ "${1:-}" == "--quick" || "${1:-}" == "" ]]; then
if [ -d "$ROOT/dirac/node_modules/mocha" ]; then
run_suite "dirac (unit)" "$ROOT/dirac" \
"cross-env TS_NODE_PROJECT=./tsconfig.unit-test.json npx mocha"
else
echo "SKIP dirac — run npm install first"
SKIP=$((SKIP + 1))
fi
fi
echo ""
echo "══════════════════════════════════════"
echo " RESULTS: $PASS passed, $FAIL failed, $SKIP skipped"
echo "══════════════════════════════════════"
exit $FAIL