File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,7 +139,10 @@ jobs:
139139 # Update port in manifest (modify the line containing 'port: 8000' or 'port: XXXX')
140140 sed -i "s/port: [0-9]*/port: $port/" "$manifest_path"
141141
142- echo "Updated $manifest_path to use port $port"
142+ # Update host_address to localhost for CI (Docker can't reach host.docker.internal from inside container)
143+ sed -i "s/host_address: host.docker.internal/host_address: localhost/" "$manifest_path"
144+
145+ echo "Updated $manifest_path to use port $port and host_address: localhost"
143146 fi
144147
145148 # Debug connectivity before running test
Original file line number Diff line number Diff line change @@ -275,9 +275,30 @@ except Exception as e:
275275 print(f'❌ HTTP request failed: {e}')
276276"
277277
278- # Run the tests
279- uv run pytest tests/test_agent.py -v -s
280- local exit_code=$?
278+ # Run the tests with retry mechanism
279+ local max_retries=3
280+ local retry_count=0
281+ local exit_code=1
282+
283+ while [ $retry_count -lt $max_retries ]; do
284+ echo -e " ${YELLOW} 🧪 Running tests (attempt $(( retry_count + 1 )) /$max_retries )...${NC} "
285+
286+ uv run pytest tests/test_agent.py -v -s
287+ exit_code=$?
288+
289+ if [ $exit_code -eq 0 ]; then
290+ echo -e " ${GREEN} ✅ Tests passed on attempt $(( retry_count + 1 )) ${NC} "
291+ break
292+ else
293+ retry_count=$(( retry_count + 1 ))
294+ if [ $retry_count -lt $max_retries ]; then
295+ echo -e " ${YELLOW} ⚠️ Tests failed on attempt $retry_count , retrying in 5 seconds...${NC} "
296+ sleep 5
297+ else
298+ echo -e " ${RED} ❌ Tests failed after $max_retries attempts${NC} "
299+ fi
300+ fi
301+ done
281302
282303 # Return to original directory
283304 cd " $original_dir "
You can’t perform that action at this time.
0 commit comments