Content Page #19

Merged
an.di merged 48 commits from adilallo/feature/Blog into main 2025-09-18 15:44:46 +00:00
Showing only changes of commit 0e4188a390 - Show all commits
+20 -8
View File
@@ -174,23 +174,35 @@ jobs:
echo "⏳ Waiting for server to be ready..."
npx wait-on -t 120000 "tcp:$HOST:$PORT"
# Verify server is actually responding
for i in {1..10}; do
if curl -fsS "http://$HOST:$PORT" >/dev/null 2>&1; then
echo "✅ App is responding at http://$HOST:$PORT"
# Verify server is actually responding to all test routes
echo "🔍 Verifying server readiness for all test routes..."
for i in {1..15}; do
# Check all routes that will be tested in visual regression
if curl -fsS "http://$HOST:$PORT" >/dev/null 2>&1 && \
curl -fsS "http://$HOST:$PORT/blog" >/dev/null 2>&1 && \
curl -fsS "http://$HOST:$PORT/blog/resolving-active-conflicts" >/dev/null 2>&1; then
echo "✅ App is responding to all test routes at http://$HOST:$PORT"
break
else
echo "⏳ Attempt $i/10: Server not ready yet, waiting..."
sleep 5
if [ $i -eq 10 ]; then
echo "❌ Server failed to respond after 10 attempts"
echo "⏳ Attempt $i/15: Server not ready for all routes yet, waiting..."
sleep 3
if [ $i -eq 15 ]; then
echo "❌ Server failed to respond to all routes after 15 attempts"
echo "📋 Server logs:"
cat .next/runner.log || true
echo "🔍 Testing individual routes:"
curl -I "http://$HOST:$PORT" || echo "❌ Homepage failed"
curl -I "http://$HOST:$PORT/blog" || echo "❌ Blog failed"
curl -I "http://$HOST:$PORT/blog/resolving-active-conflicts" || echo "❌ Blog post failed"
exit 1
fi
fi
done
# Give server a moment to fully settle after all routes are ready
echo "⏳ Allowing server to fully settle..."
sleep 5
# Run visual regression tests with server monitoring
echo "🧪 Running visual regression tests..."