Skip to content

Commit d103124

Browse files
committed
Add lemonade client tests to CI workflows
1 parent b66f557 commit d103124

File tree

3 files changed

+88
-5
lines changed

3 files changed

+88
-5
lines changed

.github/workflows/test_gaia_cli_linux.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,20 @@ jobs:
195195
echo "Note: Error details displayed above"
196196
fi
197197
198+
echo ""
199+
echo "=== Testing Lemonade Client Integration ==="
200+
echo "Testing LemonadeClient API with running server"
201+
202+
# Run the lemonade client integration tests (skip hybrid NPU test - no NPU on Linux)
203+
GAIA_TEST_MODEL="Qwen3-0.6B-GGUF" python -m pytest tests/test_lemonade_client.py -vs --tb=short -k "Integration and not hybrid" || LEMONADE_TEST_EXIT=$?
204+
205+
if [ "${LEMONADE_TEST_EXIT:-0}" -eq 0 ]; then
206+
echo "✅ Lemonade client integration tests passed successfully!"
207+
else
208+
echo "❌ Lemonade client integration tests failed with exit code: ${LEMONADE_TEST_EXIT}"
209+
echo "Note: Error details displayed above"
210+
fi
211+
198212
# Clean up: Stop the Lemonade server
199213
echo "Stopping Lemonade server..."
200214
kill $LEMONADE_PID 2>/dev/null || true
@@ -294,6 +308,7 @@ jobs:
294308
echo " ✅ Evaluation commands (eval, groundtruth, report, etc.)"
295309
echo " ✅ Summarizer CLI integration (gaia summarize command)"
296310
echo " ✅ RAG (Retrieval-Augmented Generation) functionality"
311+
echo " ✅ Lemonade client integration (API tests)"
297312
echo " ✅ Cross-platform compatibility"
298313
echo " ✅ Process management and cleanup"
299314
echo ""

.github/workflows/test_gaia_cli_windows.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,77 @@ jobs:
321321
echo ================================================================
322322
)
323323
324+
- name: Run Lemonade Client Integration Tests (CMD)
325+
shell: cmd
326+
env:
327+
PYTHONUTF8: 1
328+
GAIA_TEST_MODEL: Llama-3.2-3B-Instruct-Hybrid
329+
run: |
330+
REM Activate virtual environment
331+
call "%GITHUB_WORKSPACE%\.venv\Scripts\activate.bat"
332+
333+
echo ================================================================
334+
echo LEMONADE CLIENT INTEGRATION TESTS
335+
echo ================================================================
336+
echo Virtual Environment: %VIRTUAL_ENV%
337+
echo Python Version:
338+
python --version
339+
echo Test Model: %GAIA_TEST_MODEL%
340+
echo Working Directory: %CD%
341+
echo.
342+
343+
REM Initialize test tracking
344+
set lemonade_exit=0
345+
346+
REM ================================================================
347+
REM TEST_LEMONADE_CLIENT.PY - INTEGRATION TESTS ONLY
348+
REM ================================================================
349+
echo ****************************************************************
350+
echo LEMONADE CLIENT INTEGRATION TESTS
351+
echo ****************************************************************
352+
echo Starting test_lemonade_client.py integration tests at %TIME%...
353+
echo.
354+
355+
REM Run only integration tests (skip mock tests which don't need server)
356+
python -m pytest tests\test_lemonade_client.py -vs --tb=short -k "Integration"
357+
set lemonade_exit=%ERRORLEVEL%
358+
359+
echo.
360+
echo ----------------------------------------------------------------
361+
echo test_lemonade_client.py completed at %TIME% with exit code: %lemonade_exit%
362+
if %lemonade_exit% equ 0 (
363+
echo [SUCCESS] Lemonade client integration tests passed
364+
) else (
365+
echo [FAILURE] Lemonade client integration tests failed with exit code %lemonade_exit%
366+
echo Full error output displayed above - no truncation
367+
)
368+
echo ----------------------------------------------------------------
369+
echo.
370+
371+
REM ================================================================
372+
REM LEMONADE CLIENT TEST SUMMARY
373+
REM ================================================================
374+
echo ================================================================
375+
echo LEMONADE CLIENT TEST SUMMARY
376+
echo ================================================================
377+
echo test_lemonade_client.py: exit code %lemonade_exit%
378+
echo ================================================================
379+
380+
if %lemonade_exit% neq 0 (
381+
echo [FAILURE] Lemonade client integration tests failed
382+
echo ================================================================
383+
echo FAILED TEST:
384+
echo - test_lemonade_client.py ^(exit code %lemonade_exit%^)
385+
echo ================================================================
386+
echo IMPORTANT: All error messages are displayed in full above
387+
echo No PowerShell wrapping or truncation - raw Python output preserved
388+
echo ================================================================
389+
exit /b 1
390+
) else (
391+
echo [SUCCESS] Lemonade client integration tests passed successfully
392+
echo ================================================================
393+
)
394+
324395
- name: Debug GAIA Logs on Failure
325396
if: failure()
326397
shell: cmd

tests/test_lemonade_client.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@
2222
create_lemonade_client,
2323
)
2424

25-
# Test constants
26-
TEST_MODEL = "Llama-3.2-3B-Instruct-Hybrid"
27-
# TEST_MODEL = "Gemma-3-4b-it-FLM"
28-
# TEST_MODEL = "Qwen3-Coder-30B-A3B-Instruct-GGUF"
29-
# TEST_MODEL = "Qwen2.5-0.5B-Instruct-CPU"
25+
# Test constants - override via GAIA_TEST_MODEL env var for different platforms
26+
TEST_MODEL = os.environ.get("GAIA_TEST_MODEL", "Llama-3.2-3B-Instruct-Hybrid")
3027

3128
HOST = "localhost"
3229
PORT = 8000

0 commit comments

Comments
 (0)