@@ -209,7 +209,8 @@ jobs:
209
209
needs : e2e-test
210
210
if : github.event.pull_request.draft == false
211
211
env :
212
- LOG_DIR : /tmp/debug-logs-${{ github.event.pull_request.number || 'main' }}
212
+ LOG_DIR : /tmp/static-discovery-e2e-test-${{ github.event.pull_request.number || 'main' }}
213
+
213
214
steps :
214
215
- name : Check out repository code
215
216
uses : actions/checkout@v4
@@ -232,46 +233,26 @@ jobs:
232
233
run : |
233
234
echo "🚀 Starting vLLM serve backend"
234
235
mkdir -p "$LOG_DIR"
235
- CUDA_VISIBLE_DEVICES=0 vllm serve facebook/opt-125m --port 8001 --gpu-memory-utilization 0.7 > "$LOG_DIR/backend1.log" 2>&1 &
236
- CUDA_VISIBLE_DEVICES=1 vllm serve facebook/opt-125m --port 8002 --gpu-memory-utilization 0.7 > "$LOG_DIR/backend2.log" 2>&1 &
237
- sleep 3
236
+ CUDA_VISIBLE_DEVICES=0 vllm serve facebook/opt-125m --port 8001 --gpu-memory-utilization 0.7 --chat-template .github/template-chatml.jinja > "$LOG_DIR/backend1.log" 2>&1 &
237
+ CUDA_VISIBLE_DEVICES=1 vllm serve facebook/opt-125m --port 8002 --gpu-memory-utilization 0.7 --chat-template .github/template-chatml.jinja > "$LOG_DIR/backend2.log" 2>&1 &
238
238
239
239
- name : Wait for backends to be ready
240
240
run : |
241
241
echo "⏳ Waiting for backends to be ready"
242
- chmod +x .github /wait-for-backends.sh
243
- ./.github /wait-for-backends.sh 180 "http://localhost:8001" "http://localhost:8002"
242
+ chmod +x tests/e2e /wait-for-backends.sh
243
+ ./tests/e2e /wait-for-backends.sh 180 "http://localhost:8001" "http://localhost:8002"
244
244
245
- - name : Start Router with static discovery and roundrobin routing
245
+ - name : Run All Static Discovery Routing Tests
246
246
env :
247
247
PYTHONPATH : ${{ github.workspace }}/src
248
248
run : |
249
- echo "🔧 Starting router with static discovery and roundrobin routing"
250
- echo "PYTHONPATH=$PYTHONPATH"
251
- # Start router in background with log capture
252
- python3 -m src.vllm_router.app --port 30080 \
253
- --service-discovery static \
254
- --static-backends "http://localhost:8001,http://localhost:8002" \
255
- --static-models "facebook/opt-125m,facebook/opt-125m" \
256
- --static-model-types "chat,chat" \
257
- --log-stats \
258
- --log-stats-interval 10 \
259
- --engine-stats-interval 10 \
260
- --request-stats-window 10 \
261
- --routing-logic roundrobin > "$LOG_DIR/router.log" 2>&1 &
262
- ROUTER_PID=$!
263
- echo "Router started with PID: $ROUTER_PID"
264
- # Check if router is running
265
- timeout 30 bash -c 'until curl -s http://localhost:30080 > /dev/null 2>&1; do sleep 1; done' || {
266
- echo "❌ Router failed to start within 30 seconds"
267
- exit 1
268
- }
269
- echo "✅ Router started successfully"
270
-
271
- - name : Run static discovery E2E test
272
- run : |
273
- echo "🧪 Running static discovery test"
274
- python3 tests/e2e/test-static-discovery.py --num-requests 20 --verbose --log-file-path "$LOG_DIR/router.log" --router-url http://localhost:30080
249
+ echo "🧪 Running all static discovery routing tests sequentially"
250
+ chmod +x tests/e2e/run-static-discovery-routing-test.sh
251
+ ./tests/e2e/run-static-discovery-routing-test.sh all \
252
+ --pythonpath "$PYTHONPATH" \
253
+ --log-dir "$LOG_DIR" \
254
+ --num-requests 20 \
255
+ --verbose
275
256
timeout-minutes : 5
276
257
277
258
- name : Archive static discovery test results and logs
@@ -280,14 +261,13 @@ jobs:
280
261
with :
281
262
name : static-discovery-test-results-pr-${{ github.event.pull_request.number || 'main' }}
282
263
path : |
283
- /tmp/static-discovery-results-*
284
- $LOG_DIR/
264
+ ${{ env.LOG_DIR }}/*
285
265
286
266
- name : Cleanup processes
287
267
if : always()
288
268
run : |
289
269
echo "🧹 Cleaning up processes"
290
- pkill -f "vllm serve"
291
- pkill -f "python3 -m src.vllm_router.app"
270
+ pkill -f "vllm serve" || true
271
+ pkill -f "python3 -m src.vllm_router.app" || true
292
272
293
273
- run : echo "🍏 Static discovery e2e test job status is ${{ job.status }}."
0 commit comments