@@ -21,10 +21,10 @@ concurrency:
2121 cancel-in-progress : true
2222
2323jobs :
24- test-quickstart :
24+ test-ci-compose :
2525 if : github.repository == 'vllm-project/semantic-router' && !github.event.pull_request.draft
2626 runs-on : ubuntu-latest
27- timeout-minutes : 30
27+ timeout-minutes : 20 # Reduced from 30 - CI compose is faster
2828
2929 steps :
3030 - name : Check out the repo
@@ -46,33 +46,93 @@ jobs:
4646 with :
4747 python-version : ' 3.11'
4848
49- - name : Install system dependencies
49+ - name : Install dependencies
5050 run : |
5151 sudo apt-get update
52- sudo apt-get install -y \
53- make \
54- curl \
55- docker-compose
52+ sudo apt-get install -y make curl
53+ pip install huggingface_hub[cli]
5654
57- - name : Run quickstart script
58- id : quickstart
55+ - name : Download models
5956 run : |
60- timeout 1200 bash scripts/quickstart.sh || {
61- exit_code=$?
62- if [ $exit_code -eq 124 ]; then
63- echo "::error::Quickstart script timed out after 20 minutes"
64- else
65- echo "::error::Quickstart script failed with exit code $exit_code"
66- fi
67- exit $exit_code
68- }
57+ echo "Downloading minimal models for CI..."
58+ make download-models
6959 env :
7060 CI : true
7161 CI_MINIMAL_MODELS : true
72- TERM : xterm
7362 HF_HUB_ENABLE_HF_TRANSFER : 1
7463 HF_HUB_DISABLE_TELEMETRY : 1
7564
65+ - name : Start CI services
66+ run : |
67+ echo "Starting minimal CI services (semantic-router, envoy, llm-katan)..."
68+ make docker-compose-up-ci
69+ env :
70+ CI : true
71+
72+ - name : Wait for services to be healthy
73+ run : |
74+ echo "Waiting for services to be healthy..."
75+ max_attempts=60
76+ attempt=1
77+
78+ while [ $attempt -le $max_attempts ]; do
79+ echo "Attempt $attempt/$max_attempts: Checking service health..."
80+
81+ # Check semantic-router health
82+ if docker ps --filter "name=semantic-router" --filter "health=healthy" --format "{{.Names}}" | grep -q "semantic-router"; then
83+ echo "✅ semantic-router is healthy"
84+
85+ # Check envoy health
86+ if docker ps --filter "name=envoy-proxy" --filter "health=healthy" --format "{{.Names}}" | grep -q "envoy-proxy"; then
87+ echo "✅ envoy-proxy is healthy"
88+
89+ # Check llm-katan health
90+ if docker ps --filter "name=llm-katan" --filter "health=healthy" --format "{{.Names}}" | grep -q "llm-katan"; then
91+ echo "✅ llm-katan is healthy"
92+ echo "🎉 All services are healthy!"
93+ exit 0
94+ fi
95+ fi
96+ fi
97+
98+ # Show current status
99+ docker ps --format "table {{.Names}}\t{{.Status}}" | grep -E "NAMES|semantic-router|envoy|llm-katan" || true
100+
101+ sleep 5
102+ ((attempt++))
103+ done
104+
105+ echo "❌ Timeout waiting for services to be healthy"
106+ docker ps -a
107+ exit 1
108+
109+ - name : Test semantic router health endpoint
110+ run : |
111+ echo "Testing semantic router health..."
112+ curl -f http://localhost:8080/health || {
113+ echo "❌ Health check failed"
114+ exit 1
115+ }
116+ echo "✅ Health check passed"
117+
118+ - name : Test envoy proxy endpoint
119+ run : |
120+ echo "Testing envoy proxy..."
121+ curl -f http://localhost:19000/ready || {
122+ echo "❌ Envoy ready check failed"
123+ exit 1
124+ }
125+ echo "✅ Envoy is ready"
126+
127+ - name : Test llm-katan endpoint
128+ run : |
129+ echo "Testing llm-katan..."
130+ curl -f http://localhost:8002/health || {
131+ echo "❌ LLM-Katan health check failed"
132+ exit 1
133+ }
134+ echo "✅ LLM-Katan is healthy"
135+
76136 - name : Test semantic routing functionality
77137 run : |
78138 echo "Testing semantic router with a sample query..."
@@ -85,24 +145,31 @@ jobs:
85145 "temperature": 0.7
86146 }')
87147
88- echo "Full response: $response"
148+ echo "Response: $response"
149+
150+ # Verify we got a response
151+ if echo "$response" | grep -q "choices"; then
152+ echo "✅ Chat completions test passed"
153+ else
154+ echo "⚠️ Response may not contain expected fields, but request succeeded"
155+ fi
89156
90157 - name : Show service logs on failure
91158 if : failure()
92159 run : |
93160 echo "=== Docker Compose Logs ==="
94- docker compose -f deploy/docker-compose/docker-compose.yml logs
161+ make docker-compose-logs-ci || docker compose -f deploy/docker-compose/docker-compose.ci .yml logs
95162 echo "=== Container Status ==="
96163 docker ps -a
97164 echo "=== Semantic Router Logs ==="
98- docker logs semantic-router || true
165+ docker logs semantic-router 2>&1 | tail -100 || true
99166 echo "=== Envoy Logs ==="
100- docker logs envoy-proxy || true
101- echo "=== Dashboard Logs ==="
102- docker logs semantic-router-dashboard || true
167+ docker logs envoy-proxy 2>&1 | tail -100 || true
168+ echo "=== LLM-Katan Logs ==="
169+ docker logs llm-katan 2>&1 | tail -100 || true
103170
104171 - name : Clean up
105172 if : always()
106173 run : |
107- make docker-compose-down || true
174+ make docker-compose-down-ci || true
108175 docker system prune -af --volumes || true
0 commit comments