Skip to content

Commit 1ffabf7

Browse files
committed
running all the tests again
1 parent 579dd97 commit 1ffabf7

File tree

1 file changed

+50
-25
lines changed

1 file changed

+50
-25
lines changed

.github/workflows/agentex-tutorials-test.yml

Lines changed: 50 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ jobs:
3838
yq eval '.services.agentex.extra_hosts = ["host.docker.internal:host-gateway"]' -i docker-compose.yml
3939
4040
echo "✅ Added extra_hosts configuration to agentex service"
41-
echo "🔍 Updated agentex service config:"
42-
grep -A 10 "container_name: agentex" docker-compose.yml || echo "Could not find agentex service"
4341
4442
- name: Navigate to scale-agentex repo
4543
run: |
@@ -72,15 +70,6 @@ jobs:
7270
sleep 5
7371
done
7472
75-
# Debug port mappings
76-
echo "🔍 Docker port mappings:"
77-
docker compose ps
78-
echo ""
79-
echo "🔍 Docker port details:"
80-
docker compose ps --format "table {{.Name}}\t{{.Image}}\t{{.Ports}}"
81-
echo ""
82-
echo "🔍 Testing AgentEx server accessibility:"
83-
curl -v --max-time 10 http://localhost:5003/health 2>&1 || echo "❌ AgentEx not accessible on localhost:5003"
8473
8574
- name: Build AgentEx SDK
8675
run: |
@@ -137,8 +126,8 @@ jobs:
137126
failed_tests=()
138127
passed_tests=()
139128
140-
# Run only the first test for sanity check
141-
for i in 0; do
129+
# Run all tutorial tests
130+
for i in "${!tutorial_paths[@]}"; do
142131
tutorial="${tutorial_paths[$i]}"
143132
port=$((8000 + i))
144133
@@ -162,9 +151,6 @@ jobs:
162151
echo "Updated $manifest_path to use port $port (keeping host_address: host.docker.internal)"
163152
fi
164153
165-
# Debug connectivity before running test
166-
echo "🔍 Pre-test connectivity check:"
167-
curl -v --max-time 5 http://localhost:5003/agents 2>&1 || echo "❌ /agents endpoint not accessible"
168154
169155
# Run test in background with unique port
170156
(
@@ -252,34 +238,73 @@ jobs:
252238
echo " ❌ $test"
253239
done
254240
241+
242+
exit 1
243+
else
244+
echo ""
245+
echo "🎉 All tests passed!"
246+
fi
247+
248+
- name: Debug Logs for Failed Tests
249+
if: always()
250+
run: |
251+
cd scale-agentex/agentex
252+
253+
echo ""
254+
echo "================================================================================"
255+
echo "🐛 DEBUG LOGS (for troubleshooting)"
256+
echo "================================================================================"
257+
258+
# Show AgentEx server container logs
259+
echo ""
260+
echo "========================================="
261+
echo "AGENTEX SERVER LOGS"
262+
echo "========================================="
263+
echo "📋 AgentEx server container logs (last 200 lines):"
264+
echo "----------------------------------------"
265+
docker logs agentex --tail=200 2>/dev/null || {
266+
echo "❌ Failed to get logs from 'agentex' container"
267+
echo "Available containers:"
268+
docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Image}}"
269+
}
270+
echo "----------------------------------------"
271+
272+
# Show tutorial agent logs for failed tests
273+
cd ../../examples/tutorials
274+
275+
# Check if there were any failed tests
276+
failed_tests=()
277+
for i in {0..20}; do # Check up to 20 possible tests
278+
if [ -f "/tmp/failed_$i.txt" ]; then
279+
failed_tests+=($(cat "/tmp/failed_$i.txt"))
280+
fi
281+
done
282+
283+
if [ ${#failed_tests[@]} -gt 0 ]; then
255284
echo ""
256285
echo "========================================="
257286
echo "TUTORIAL AGENT LOGS FOR FAILED TESTS"
258287
echo "========================================="
259288
260-
# Show logs for failed tests
261289
for test in "${failed_tests[@]}"; do
262290
test_name=$(basename "$test")
263291
logfile="/tmp/agentex-${test_name}.log"
264292
265293
echo ""
266-
echo "📋 Tutorial agent logs for $test ($logfile):"
294+
echo "📋 Tutorial agent logs for $test:"
267295
echo "----------------------------------------"
268296
269297
if [ -f "$logfile" ]; then
270-
echo "Last 100 lines of tutorial agent logs:"
298+
echo "Tutorial agent logs (last 100 lines):"
271299
tail -100 "$logfile"
272300
else
273-
echo "⚠️ No log file found at: $logfile"
274-
echo "Available log files:"
301+
echo "⚠️ No agent log file found at: $logfile"
302+
echo "Available agent log files:"
275303
ls -la /tmp/agentex-*.log 2>/dev/null || echo " (none)"
276304
fi
277-
278305
echo "----------------------------------------"
279306
done
280-
281-
exit 1
282307
else
283308
echo ""
284-
echo "🎉 All tests passed!"
309+
echo "✅ No failed tests - no agent logs to show"
285310
fi

0 commit comments

Comments
 (0)