veza/validate_v0101.sh
senke 1a0d2bb7c9 [T0-002] fix(rust): Corriger erreurs compilation Rust
- Conflit SQLx résolu (alignement sur version 0.7)
- build.rs configurés pour protoc dans chat/stream servers
- API Prometheus migrée vers HistogramOpts
- Traits Display/Debug corrigés (String au lieu de &dyn Display)
- API TOTP corrigée (totp-rs 5.4 avec Secret::Encoded)
- Layers tracing-subscriber corrigés (types conditionnels)
- VezaError/VezaResult exportés dans lib.rs
- TransactionProvider simplifié (retour void au lieu de Box<dyn>)
- VezaConfig contraint Serialize pour to_json()

Files: veza-common/Cargo.toml, veza-common/src/*.rs, veza-chat-server/Cargo.toml, veza-chat-server/build.rs, veza-stream-server/Cargo.toml, veza-stream-server/build.rs, VEZA_ROADMAP.json
Hours: 8 estimated, 3 actual
2026-01-04 01:44:20 +01:00

151 lines
3.8 KiB
Bash
Executable file
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Validation Finale v0.101
# Lance tous les tests pour confirmer que la version est prête
set -e
echo "🎯 VALIDATION FINALE v0.101"
echo "==========================="
echo ""
PASSED=0
FAILED=0
RESULTS=()
# Fonction pour logger les résultats
log_result() {
local name=$1
local status=$2
if [ "$status" -eq 0 ]; then
RESULTS+=("$name")
((PASSED++))
else
RESULTS+=("$name")
((FAILED++))
fi
}
# 1. Backend Tests
echo "1⃣ Tests Backend (Go)"
echo "----------------------"
cd backend 2>/dev/null || cd ../backend 2>/dev/null || { echo "❌ Dossier backend non trouvé"; exit 1; }
if go test ./... -short -count=1 2>&1 | tee /tmp/go_tests.txt; then
log_result "Tests Backend" 0
else
log_result "Tests Backend" 1
fi
echo ""
# 2. Frontend Build
echo "2⃣ Build Frontend"
echo "------------------"
cd ../frontend 2>/dev/null || cd frontend 2>/dev/null
if npm run build 2>&1 | tail -5; then
log_result "Build Frontend" 0
else
log_result "Build Frontend" 1
fi
echo ""
# 3. Tests E2E (optionnel)
echo "3⃣ Tests E2E"
echo "-------------"
if [ -f "playwright.config.ts" ]; then
if npm run test:e2e -- --reporter=dot 2>&1 | tail -10; then
log_result "Tests E2E" 0
else
log_result "Tests E2E" 1
fi
else
echo "⚠️ Playwright non configuré, skip"
RESULTS+=("⚠️ Tests E2E (skipped)")
fi
echo ""
# 4. API Health Check
echo "4⃣ API Health Check"
echo "--------------------"
API_URL="${API_URL:-http://localhost:8080}"
if curl -sf "$API_URL/health" > /dev/null 2>&1; then
log_result "API Health" 0
echo "API répond sur $API_URL"
else
echo "⚠️ API non accessible sur $API_URL"
RESULTS+=("⚠️ API Health (server not running)")
fi
echo ""
# 5. Parcours Utilisateur
echo "5⃣ Parcours Utilisateur"
echo "------------------------"
if [ -f "../test_user_journey.sh" ]; then
cd ..
if bash test_user_journey.sh 2>&1 | tail -20; then
log_result "Parcours Utilisateur" 0
else
log_result "Parcours Utilisateur" 1
fi
elif [ -f "test_user_journey.sh" ]; then
if bash test_user_journey.sh 2>&1 | tail -20; then
log_result "Parcours Utilisateur" 0
else
log_result "Parcours Utilisateur" 1
fi
else
echo "⚠️ Script test_user_journey.sh non trouvé"
RESULTS+=("⚠️ Parcours Utilisateur (script missing)")
fi
echo ""
# 6. Vérification JSON State
echo "6⃣ État v0.101"
echo "---------------"
if [ -f "V0101_STATE.json" ]; then
SCORE=$(jq -r '.objective.current_score' V0101_STATE.json)
TODO_COUNT=$(jq '[.phases[].tasks[] | select(.status == "TODO")] | length' V0101_STATE.json)
BLOCKED_COUNT=$(jq '[.phases[].tasks[] | select(.status == "BLOCKED")] | length' V0101_STATE.json)
echo "Score actuel: $SCORE/100"
echo "Tâches TODO: $TODO_COUNT"
echo "Tâches BLOCKED: $BLOCKED_COUNT"
if [ "$TODO_COUNT" -eq 0 ] && [ "$BLOCKED_COUNT" -eq 0 ]; then
log_result "Toutes tâches complétées" 0
else
log_result "Tâches restantes" 1
fi
else
echo "⚠️ V0101_STATE.json non trouvé"
RESULTS+=("⚠️ État v0.101 (file missing)")
fi
echo ""
# Résumé
echo "=============================="
echo "📊 RÉSUMÉ"
echo "=============================="
for result in "${RESULTS[@]}"; do
echo "$result"
done
echo ""
echo "Passés: $PASSED"
echo "Échoués: $FAILED"
echo ""
# Verdict final
if [ "$FAILED" -eq 0 ]; then
echo "🎉 v0.101 EST PRÊTE POUR LA RELEASE!"
echo ""
echo "Prochaines étapes:"
echo " 1. git add -A"
echo " 2. git commit -m 'Release v0.101 - Proof of Concept'"
echo " 3. git tag -a v0.101 -m 'First stable POC without Rust modules'"
echo " 4. git push origin main --tags"
echo " 5. Créer la release sur GitHub"
exit 0
else
echo "❌ Des corrections sont encore nécessaires"
echo ""
echo "Consulte le fichier V0101_STATE.json pour voir les tâches restantes."
exit 1
fi