chore(ci): dont run llama stack server always (#3188)

Sometimes the server has already been started (e.g., via docker). Just a
convenience here so we can reuse this script more.
This commit is contained in:
Ashwin Bharambe 2025-08-18 10:11:55 -07:00 committed by GitHub
parent a8091d0c6a
commit f4cecaade9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -133,6 +133,10 @@ else
EXTRA_PARAMS="" EXTRA_PARAMS=""
fi fi
THIS_DIR=$(dirname "$0")
ROOT_DIR="$THIS_DIR/.."
cd $ROOT_DIR
# Set recording directory # Set recording directory
if [[ "$RUN_VISION_TESTS" == "true" ]]; then if [[ "$RUN_VISION_TESTS" == "true" ]]; then
export LLAMA_STACK_TEST_RECORDING_DIR="tests/integration/recordings/vision" export LLAMA_STACK_TEST_RECORDING_DIR="tests/integration/recordings/vision"
@ -142,6 +146,10 @@ fi
# Start Llama Stack Server if needed # Start Llama Stack Server if needed
if [[ "$STACK_CONFIG" == *"server:"* ]]; then if [[ "$STACK_CONFIG" == *"server:"* ]]; then
# check if server is already running
if curl -s http://localhost:8321/v1/health 2>/dev/null | grep -q "OK"; then
echo "Llama Stack Server is already running, skipping start"
else
echo "=== Starting Llama Stack Server ===" echo "=== Starting Llama Stack Server ==="
nohup uv run llama stack run ci-tests --image-type venv > server.log 2>&1 & nohup uv run llama stack run ci-tests --image-type venv > server.log 2>&1 &
@ -161,6 +169,7 @@ if [[ "$STACK_CONFIG" == *"server:"* ]]; then
done done
echo "" echo ""
fi fi
fi
# Run tests # Run tests
echo "=== Running Integration Tests ===" echo "=== Running Integration Tests ==="