Skip to content

Commit acf74cb

Browse files
authored
feat(ci): add --typescript-only flag to skip Python tests in integration test script (#4201)
This adds a `--typescript-only` flag to `scripts/integration-tests.sh` that skips pytest execution entirely while still starting the Llama Stack server (required for TS client tests). The TypeScript client can now be tested independently without Python test dependencies.
1 parent d649c36 commit acf74cb

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

scripts/integration-tests.sh

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ TEST_PATTERN=""
2020
INFERENCE_MODE="replay"
2121
EXTRA_PARAMS=""
2222
COLLECT_ONLY=false
23+
TYPESCRIPT_ONLY=false
2324

2425
# Function to display usage
2526
usage() {
@@ -34,6 +35,7 @@ Options:
3435
--subdirs STRING Comma-separated list of test subdirectories to run (overrides suite)
3536
--pattern STRING Regex pattern to pass to pytest -k
3637
--collect-only Collect tests only without running them (skips server startup)
38+
--typescript-only Skip Python tests and run only TypeScript client tests
3739
--help Show this help message
3840
3941
Suites are defined in tests/integration/suites.py and define which tests to run.
@@ -90,6 +92,10 @@ while [[ $# -gt 0 ]]; do
9092
COLLECT_ONLY=true
9193
shift
9294
;;
95+
--typescript-only)
96+
TYPESCRIPT_ONLY=true
97+
shift
98+
;;
9399
--help)
94100
usage
95101
exit 0
@@ -544,16 +550,23 @@ if [[ -n "$STACK_CONFIG" ]]; then
544550
STACK_CONFIG_ARG="--stack-config=$STACK_CONFIG"
545551
fi
546552

547-
pytest -s -v $PYTEST_TARGET \
548-
$STACK_CONFIG_ARG \
549-
--inference-mode="$INFERENCE_MODE" \
550-
-k "$PYTEST_PATTERN" \
551-
$EXTRA_PARAMS \
552-
--color=yes \
553-
--embedding-model=sentence-transformers/nomic-ai/nomic-embed-text-v1.5 \
554-
--color=yes $EXTRA_PARAMS \
555-
--capture=tee-sys
556-
exit_code=$?
553+
# Run Python tests unless typescript-only mode
554+
if [[ "$TYPESCRIPT_ONLY" == "false" ]]; then
555+
pytest -s -v $PYTEST_TARGET \
556+
$STACK_CONFIG_ARG \
557+
--inference-mode="$INFERENCE_MODE" \
558+
-k "$PYTEST_PATTERN" \
559+
$EXTRA_PARAMS \
560+
--color=yes \
561+
--embedding-model=sentence-transformers/nomic-ai/nomic-embed-text-v1.5 \
562+
--color=yes $EXTRA_PARAMS \
563+
--capture=tee-sys
564+
exit_code=$?
565+
else
566+
echo "Skipping Python tests (--typescript-only mode)"
567+
exit_code=0
568+
fi
569+
557570
set +x
558571
set -e
559572

0 commit comments

Comments
 (0)