Skip to content

Commit 41fdfc5

Browse files
committed
adding a workaround for now
1 parent c8c5d4d commit 41fdfc5

File tree

2 files changed

+80
-106
lines changed

2 files changed

+80
-106
lines changed

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

Lines changed: 44 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,53 @@ on:
55

66
jobs:
77
test-tutorials:
8-
timeout-minutes: 10
9-
name: test-tutorials
8+
timeout-minutes: 15
9+
name: test-tutorial-${{ matrix.tutorial }}
1010
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
tutorial:
15+
- "00_sync/000_hello_acp"
16+
- "00_sync/010_multiturn"
17+
- "00_sync/020_streaming"
18+
- "10_agentic/00_base/000_hello_acp"
19+
- "10_agentic/00_base/010_multiturn"
20+
- "10_agentic/00_base/020_streaming"
21+
- "10_agentic/00_base/030_tracing"
22+
- "10_agentic/00_base/040_other_sdks"
23+
- "10_agentic/00_base/080_batch_events"
1124
steps:
12-
- uses: actions/checkout@v4
13-
14-
- name: Install Rye
25+
- name: Install UV
1526
run: |
16-
curl -sSf https://rye.astral.sh/get | bash
17-
echo "$HOME/.rye/shims" >> $GITHUB_PATH
18-
env:
19-
RYE_VERSION: "0.44.0"
20-
RYE_INSTALL_OPTION: "--yes"
27+
curl -LsSf https://astral.sh/uv/install.sh | sh
28+
echo "$HOME/.local/bin" >> $GITHUB_PATH
2129
22-
- name: Bootstrap
23-
run: ./scripts/bootstrap
30+
- name: Checkout scale-agentex repo
31+
uses: actions/checkout@v4
32+
with:
33+
repository: scaleapi/scale-agentex
34+
path: scale-agentex
2435

25-
- name: Simple validation test
36+
- name: Navigate to scale-agentex repo
2637
run: |
27-
echo "✅ Tutorial test workflow is working!"
28-
echo "Rye version: $(rye --version)"
29-
echo "Python version: $(python --version)"
38+
cd scale-agentex/agentex
39+
echo "🚀 Starting dependencies (Postgres, Redis, Temporal, MongoDB)..."
40+
41+
# Start all services except the agentex service
42+
docker compose up -d --scale agentex=0
43+
44+
echo "⏳ Waiting for dependencies to be healthy..."
45+
46+
# Wait for services to be healthy
47+
for i in {1..30}; do
48+
if docker compose ps | grep -q "healthy"; then
49+
echo "✅ Dependencies are healthy"
50+
break
51+
fi
52+
echo " Attempt $i/30: Waiting for services..."
53+
sleep 5
54+
done
55+
56+
# Verify all deps are up
57+
docker compose ps

examples/tutorials/run_all_agentic_tests.sh renamed to examples/tutorials/run_agent_test.sh

Lines changed: 36 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
#!/bin/bash
22
#
3-
# Run all agentic tutorial tests
3+
# Run a single agent tutorial test
44
#
5-
# This script runs the test runner for all agentic tutorials in sequence.
6-
# It stops at the first failure unless --continue-on-error is specified.
5+
# This script runs the test for a single agent tutorial.
6+
# It starts the agent, runs tests against it, then stops the agent.
77
#
88
# Usage:
9-
# ./run_all_agentic_tests.sh # Run all tutorials
10-
# ./run_all_agentic_tests.sh --continue-on-error # Run all, continue on error
11-
# ./run_all_agentic_tests.sh <tutorial_path> # Run single tutorial
12-
# ./run_all_agentic_tests.sh --view-logs # View most recent agent logs
13-
# ./run_all_agentic_tests.sh --view-logs <tutorial_path> # View logs for specific tutorial
9+
# ./run_agent_test.sh <tutorial_path> # Run single tutorial test
10+
# ./run_agent_test.sh --view-logs <tutorial_path> # View logs for specific tutorial
11+
# ./run_agent_test.sh --view-logs # View most recent agent logs
1412
#
1513

1614
set -e # Exit on error
@@ -28,44 +26,17 @@ AGENT_PORT=8000
2826
AGENTEX_SERVER_PORT=5003
2927

3028
# Parse arguments
31-
CONTINUE_ON_ERROR=false
32-
SINGLE_TUTORIAL=""
29+
TUTORIAL_PATH=""
3330
VIEW_LOGS=false
3431

3532
for arg in "$@"; do
36-
if [[ "$arg" == "--continue-on-error" ]]; then
37-
CONTINUE_ON_ERROR=true
38-
elif [[ "$arg" == "--view-logs" ]]; then
33+
if [[ "$arg" == "--view-logs" ]]; then
3934
VIEW_LOGS=true
4035
else
41-
SINGLE_TUTORIAL="$arg"
36+
TUTORIAL_PATH="$arg"
4237
fi
4338
done
4439

45-
# Find all agentic tutorial directories
46-
ALL_TUTORIALS=(
47-
# sync tutorials
48-
"00_sync/000_hello_acp"
49-
"00_sync/010_multiturn"
50-
"00_sync/020_streaming"
51-
# base tutorials
52-
"10_agentic/00_base/000_hello_acp"
53-
"10_agentic/00_base/010_multiturn"
54-
"10_agentic/00_base/020_streaming"
55-
"10_agentic/00_base/030_tracing"
56-
"10_agentic/00_base/040_other_sdks"
57-
"10_agentic/00_base/080_batch_events"
58-
# "10_agentic/00_base/090_multi_agent_non_temporal" This will require its own version of this
59-
# temporal tutorials
60-
"10_agentic/10_temporal/000_hello_acp"
61-
"10_agentic/10_temporal/010_agent_chat"
62-
"10_agentic/10_temporal/020_state_machine"
63-
)
64-
65-
PASSED=0
66-
FAILED=0
67-
FAILED_TESTS=()
68-
6940
# Function to check prerequisites for running this test suite
7041
check_prerequisites() {
7142
# Check that we are in the examples/tutorials directory
@@ -280,21 +251,16 @@ execute_tutorial_test() {
280251
# Start the agent
281252
if ! start_agent "$tutorial"; then
282253
echo -e "${RED}❌ FAILED to start agent: $tutorial${NC}"
283-
((FAILED++))
284-
FAILED_TESTS+=("$tutorial")
285254
return 1
286255
fi
287256

288257
# Run the tests
289258
local test_passed=false
290259
if run_test "$tutorial"; then
291260
echo -e "${GREEN}✅ PASSED: $tutorial${NC}"
292-
((PASSED++))
293261
test_passed=true
294262
else
295263
echo -e "${RED}❌ FAILED: $tutorial${NC}"
296-
((FAILED++))
297-
FAILED_TESTS+=("$tutorial")
298264
fi
299265

300266
# Stop the agent
@@ -313,23 +279,30 @@ execute_tutorial_test() {
313279
main() {
314280
# Handle --view-logs flag
315281
if [ "$VIEW_LOGS" = true ]; then
316-
if [[ -n "$SINGLE_TUTORIAL" ]]; then
317-
view_agent_logs "$SINGLE_TUTORIAL"
282+
if [[ -n "$TUTORIAL_PATH" ]]; then
283+
view_agent_logs "$TUTORIAL_PATH"
318284
else
319285
view_agent_logs
320286
fi
321287
exit 0
322288
fi
323289

324-
echo "================================================================================"
325-
if [[ -n "$SINGLE_TUTORIAL" ]]; then
326-
echo "Running Single Tutorial Test: $SINGLE_TUTORIAL"
327-
else
328-
echo "Running All Agentic Tutorial Tests"
329-
if [ "$CONTINUE_ON_ERROR" = true ]; then
330-
echo -e "${YELLOW}⚠️ Running in continue-on-error mode${NC}"
331-
fi
290+
# Require tutorial path
291+
if [[ -z "$TUTORIAL_PATH" ]]; then
292+
echo -e "${RED}❌ Error: Tutorial path is required${NC}"
293+
echo ""
294+
echo "Usage:"
295+
echo " ./run_agent_test.sh <tutorial_path> # Run single tutorial test"
296+
echo " ./run_agent_test.sh --view-logs <tutorial_path> # View logs for specific tutorial"
297+
echo " ./run_agent_test.sh --view-logs # View most recent agent logs"
298+
echo ""
299+
echo "Example:"
300+
echo " ./run_agent_test.sh 00_sync/000_hello_acp"
301+
exit 1
332302
fi
303+
304+
echo "================================================================================"
305+
echo "Running Tutorial Test: $TUTORIAL_PATH"
333306
echo "================================================================================"
334307
echo ""
335308

@@ -338,46 +311,19 @@ main() {
338311

339312
echo ""
340313

341-
# Determine which tutorials to run
342-
if [[ -n "$SINGLE_TUTORIAL" ]]; then
343-
TUTORIALS=("$SINGLE_TUTORIAL")
344-
else
345-
TUTORIALS=("${ALL_TUTORIALS[@]}")
346-
fi
347-
348-
# Iterate over tutorials
349-
for tutorial in "${TUTORIALS[@]}"; do
350-
execute_tutorial_test "$tutorial"
351-
352-
# Exit early if in fail-fast mode
353-
if [ "$CONTINUE_ON_ERROR" = false ] && [ $FAILED -gt 0 ]; then
354-
echo ""
355-
echo -e "${RED}Stopping due to test failure. Use --continue-on-error to continue.${NC}"
356-
exit 1
357-
fi
358-
done
359-
360-
# Print summary
361-
echo ""
362-
echo "================================================================================"
363-
echo "Test Summary"
364-
echo "================================================================================"
365-
echo -e "Total: $((PASSED + FAILED))"
366-
echo -e "${GREEN}Passed: $PASSED${NC}"
367-
echo -e "${RED}Failed: $FAILED${NC}"
368-
echo ""
369-
370-
if [ $FAILED -gt 0 ]; then
371-
echo "Failed tests:"
372-
for test in "${FAILED_TESTS[@]}"; do
373-
echo -e " ${RED}${NC} $test"
374-
done
314+
# Execute the single tutorial test
315+
if execute_tutorial_test "$TUTORIAL_PATH"; then
375316
echo ""
376-
exit 1
317+
echo "================================================================================"
318+
echo -e "${GREEN}🎉 Test passed for: $TUTORIAL_PATH${NC}"
319+
echo "================================================================================"
320+
exit 0
377321
else
378-
echo -e "${GREEN}🎉 All tests passed!${NC}"
379322
echo ""
380-
exit 0
323+
echo "================================================================================"
324+
echo -e "${RED}❌ Test failed for: $TUTORIAL_PATH${NC}"
325+
echo "================================================================================"
326+
exit 1
381327
fi
382328
}
383329

0 commit comments

Comments
 (0)