@@ -11,11 +11,18 @@ jobs:
1111 e2e_tests :
1212 runs-on : ubuntu-latest
1313 strategy :
14+ fail-fast : false
1415 matrix :
16+ mode : ["server", "library"]
1517 environment : [ "rhaiis" ]
18+
19+ name : " RHAIIS E2E: ${{ matrix.mode }} mode / ${{ matrix.environment }}"
20+
1621 env :
22+ E2E_DEPLOYMENT_MODE : ${{ matrix.mode }}
1723 OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
1824 RHAIIS_URL : ${{ secrets.RHAIIS_URL }}
25+ RHAIIS_PORT : ${{ secrets.RHAIIS_PORT }}
1926 RHAIIS_API_KEY : ${{ secrets.RHAIIS_API_KEY }}
2027 RHAIIS_MODEL : ${{ vars.RHAIIS_MODEL }}
2128 FAISS_VECTOR_STORE_ID : ${{ vars.FAISS_VECTOR_STORE_ID }}
@@ -47,37 +54,18 @@ jobs:
4754 echo "=== Recent commits (should show setup-metrics commits) ==="
4855 git log --oneline -5
4956
50- - uses : 1arp/create-a-file-action@0.4.5
51- with :
52- path : ' .'
53- isAbsolutePath : false
54- file : ' lightspeed-stack.yaml'
55- content : |
56- name: Lightspeed Core Service (LCS)
57- service:
58- host: 0.0.0.0
59- port: 8080
60- auth_enabled: false
61- workers: 1
62- color_log: true
63- access_log: true
64- llama_stack:
65- # Uses a remote llama-stack service
66- # The instance would have already been started with a llama-stack-run.yaml file
67- use_as_library_client: false
68- # Alternative for "as library use"
69- # use_as_library_client: true
70- # library_client_config_path: <path-to-llama-stack-run.yaml-file>
71- url: http://llama-stack:8321
72- api_key: xyzzy
73- user_data_collection:
74- feedback_enabled: true
75- feedback_storage: "/tmp/data/feedback"
76- transcripts_enabled: true
77- transcripts_storage: "/tmp/data/transcripts"
78-
79- authentication:
80- module: "noop"
57+ - name : Load lightspeed-stack.yaml configuration
58+ run : |
59+ MODE="${{ matrix.mode }}"
60+ CONFIG_FILE="tests/e2e/configuration/${MODE}-mode/lightspeed-stack.yaml"
61+ echo "Loading configuration for ${MODE} mode from ${CONFIG_FILE}"
62+
63+ if [ ! -f "${CONFIG_FILE}" ]; then
64+ echo "Configuration file not found: ${CONFIG_FILE}"
65+ exit 1
66+ fi
67+
68+ cp "${CONFIG_FILE}" lightspeed-stack.yaml
8169
8270 - name : Select and configure run.yaml
8371 env :
@@ -121,20 +109,22 @@ jobs:
121109
122110 - name : Test RHAIIS connectivity
123111 run : |
124- curl -f ${RHAIIS_URL}:8000 /v1/models -H "Authorization: Bearer ${RHAIIS_API_KEY}"
112+ curl -f ${RHAIIS_URL}:${RHAIIS_PORT} /v1/models -H "Authorization: Bearer ${RHAIIS_API_KEY}"
125113
126114 - name : Docker Login for quay access
115+ if : matrix.mode == 'server'
127116 env :
128117 QUAY_ROBOT_USERNAME : ${{ secrets.QUAY_DOWNSTREAM_USERNAME }}
129118 QUAY_ROBOT_TOKEN : ${{ secrets.QUAY_DOWNSTREAM_TOKEN }}
130119 run : |
131120 echo $QUAY_ROBOT_TOKEN | docker login quay.io -u=$QUAY_ROBOT_USERNAME --password-stdin
132121
133- - name : Run service manually
134- run : |
122+ - name : Run services (Server Mode)
123+ if : matrix.mode == 'server'
124+ run : |
135125 docker compose version
136126 docker compose up -d
137-
127+
138128 # Check for errors and show logs if any services failed
139129 if docker compose ps | grep -E 'Exit|exited|stopped'; then
140130 echo "Some services failed to start - showing logs:"
@@ -144,6 +134,20 @@ jobs:
144134 echo "All services started successfully"
145135 fi
146136
137+ - name : Run services (Library Mode)
138+ if : matrix.mode == 'library'
139+ run : |
140+ echo "Starting service in library mode (1 container)"
141+ docker compose -f docker-compose-library.yaml up -d
142+
143+ if docker compose -f docker-compose-library.yaml ps | grep -E 'Exit|exited|stopped'; then
144+ echo "Service failed to start - showing logs:"
145+ docker compose -f docker-compose-library.yaml logs
146+ exit 1
147+ else
148+ echo "Service started successfully"
149+ fi
150+
147151 - name : Wait for services
148152 run : |
149153 echo "Waiting for services to be healthy..."
@@ -153,12 +157,20 @@ jobs:
153157 run : |
154158 echo "Testing basic connectivity before full test suite..."
155159 curl -f http://localhost:8080/v1/models || {
156- echo "❌ Basic connectivity failed - showing logs before running full tests"
157- docker compose logs --tail=30
160+ echo "Basic connectivity failed - showing logs"
161+ if [ "${{ matrix.mode }}" == "server" ]; then
162+ docker compose logs --tail=30
163+ else
164+ docker compose -f docker-compose-library.yaml logs --tail=30
165+ fi
158166 exit 1
159167 }
160168
161169 - name : Run e2e tests
170+ env :
171+ TERM : xterm-256color
172+ FORCE_COLOR : 1
173+ E2E_DEPLOYMENT_MODE : ${{ matrix.mode }}
162174 run : |
163175 echo "Installing test dependencies..."
164176 pip install uv
@@ -171,9 +183,14 @@ jobs:
171183 if : failure()
172184 run : |
173185 echo "=== Test failure logs ==="
174- echo "=== llama-stack logs ==="
175- docker compose logs llama-stack
176-
177- echo ""
178- echo "=== lightspeed-stack logs ==="
179- docker compose logs lightspeed-stack
186+
187+ if [ "${{ matrix.mode }}" == "server" ]; then
188+ echo "=== llama-stack logs ==="
189+ docker compose logs llama-stack
190+ echo ""
191+ echo "=== lightspeed-stack logs ==="
192+ docker compose logs lightspeed-stack
193+ else
194+ echo "=== lightspeed-stack (library mode) logs ==="
195+ docker compose -f docker-compose-library.yaml logs lightspeed-stack
196+ fi
0 commit comments