@@ -11,13 +11,21 @@ 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 }}
28+ FAISS_VECTOR_STORE_ID : ${{ vars.FAISS_VECTOR_STORE_ID }}
2129
2230 steps :
2331 - uses : actions/checkout@v4
@@ -46,37 +54,18 @@ jobs:
4654 echo "=== Recent commits (should show setup-metrics commits) ==="
4755 git log --oneline -5
4856
49- - uses : 1arp/create-a-file-action@0.4.5
50- with :
51- path : ' .'
52- isAbsolutePath : false
53- file : ' lightspeed-stack.yaml'
54- content : |
55- name: Lightspeed Core Service (LCS)
56- service:
57- host: 0.0.0.0
58- port: 8080
59- auth_enabled: false
60- workers: 1
61- color_log: true
62- access_log: true
63- llama_stack:
64- # Uses a remote llama-stack service
65- # The instance would have already been started with a llama-stack-run.yaml file
66- use_as_library_client: false
67- # Alternative for "as library use"
68- # use_as_library_client: true
69- # library_client_config_path: <path-to-llama-stack-run.yaml-file>
70- url: http://llama-stack:8321
71- api_key: xyzzy
72- user_data_collection:
73- feedback_enabled: true
74- feedback_storage: "/tmp/data/feedback"
75- transcripts_enabled: true
76- transcripts_storage: "/tmp/data/transcripts"
77-
78- authentication:
79- 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
8069
8170 - name : Select and configure run.yaml
8271 env :
@@ -120,20 +109,22 @@ jobs:
120109
121110 - name : Test RHAIIS connectivity
122111 run : |
123- 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}"
124113
125114 - name : Docker Login for quay access
115+ if : matrix.mode == 'server'
126116 env :
127117 QUAY_ROBOT_USERNAME : ${{ secrets.QUAY_DOWNSTREAM_USERNAME }}
128118 QUAY_ROBOT_TOKEN : ${{ secrets.QUAY_DOWNSTREAM_TOKEN }}
129119 run : |
130120 echo $QUAY_ROBOT_TOKEN | docker login quay.io -u=$QUAY_ROBOT_USERNAME --password-stdin
131121
132- - name : Run service manually
133- run : |
122+ - name : Run services (Server Mode)
123+ if : matrix.mode == 'server'
124+ run : |
134125 docker compose version
135126 docker compose up -d
136-
127+
137128 # Check for errors and show logs if any services failed
138129 if docker compose ps | grep -E 'Exit|exited|stopped'; then
139130 echo "Some services failed to start - showing logs:"
@@ -143,6 +134,20 @@ jobs:
143134 echo "All services started successfully"
144135 fi
145136
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+
146151 - name : Wait for services
147152 run : |
148153 echo "Waiting for services to be healthy..."
@@ -152,12 +157,20 @@ jobs:
152157 run : |
153158 echo "Testing basic connectivity before full test suite..."
154159 curl -f http://localhost:8080/v1/models || {
155- echo "❌ Basic connectivity failed - showing logs before running full tests"
156- 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
157166 exit 1
158167 }
159168
160169 - name : Run e2e tests
170+ env :
171+ TERM : xterm-256color
172+ FORCE_COLOR : 1
173+ E2E_DEPLOYMENT_MODE : ${{ matrix.mode }}
161174 run : |
162175 echo "Installing test dependencies..."
163176 pip install uv
@@ -170,9 +183,14 @@ jobs:
170183 if : failure()
171184 run : |
172185 echo "=== Test failure logs ==="
173- echo "=== llama-stack logs ==="
174- docker compose logs llama-stack
175-
176- echo ""
177- echo "=== lightspeed-stack logs ==="
178- 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