mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-21 09:23:13 +00:00
feat(ci): make recording workflow simpler, more parameterizable
This commit is contained in:
parent
a6e2c18909
commit
6fa5f2b7ec
4 changed files with 89 additions and 117 deletions
14
.github/actions/run-and-record-tests/action.yml
vendored
14
.github/actions/run-and-record-tests/action.yml
vendored
|
@ -2,9 +2,13 @@ name: 'Run and Record Tests'
|
||||||
description: 'Run integration tests and handle recording/artifact upload'
|
description: 'Run integration tests and handle recording/artifact upload'
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
test-types:
|
test-subdirs:
|
||||||
description: 'JSON array of test types to run'
|
description: 'Comma-separated list of test subdirectories to run'
|
||||||
required: true
|
required: true
|
||||||
|
test-pattern:
|
||||||
|
description: 'Regex pattern to pass to pytest -k'
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
stack-config:
|
stack-config:
|
||||||
description: 'Stack configuration to use'
|
description: 'Stack configuration to use'
|
||||||
required: true
|
required: true
|
||||||
|
@ -35,9 +39,11 @@ runs:
|
||||||
./scripts/integration-tests.sh \
|
./scripts/integration-tests.sh \
|
||||||
--stack-config '${{ inputs.stack-config }}' \
|
--stack-config '${{ inputs.stack-config }}' \
|
||||||
--provider '${{ inputs.provider }}' \
|
--provider '${{ inputs.provider }}' \
|
||||||
--test-types '${{ inputs.test-types }}' \
|
--test-subdirs '${{ inputs.test-subdirs }}' \
|
||||||
|
--test-pattern '${{ inputs.test-pattern }}' \
|
||||||
--inference-mode '${{ inputs.inference-mode }}' \
|
--inference-mode '${{ inputs.inference-mode }}' \
|
||||||
${{ inputs.run-vision-tests == 'true' && '--run-vision-tests' || '' }}
|
${{ inputs.run-vision-tests == 'true' && '--run-vision-tests' || '' }} \
|
||||||
|
| tee pytest-${{ inputs.inference-mode }}.log
|
||||||
|
|
||||||
|
|
||||||
- name: Commit and push recordings
|
- name: Commit and push recordings
|
||||||
|
|
31
.github/workflows/integration-tests.yml
vendored
31
.github/workflows/integration-tests.yml
vendored
|
@ -31,6 +31,14 @@ on:
|
||||||
description: 'Test against a specific provider'
|
description: 'Test against a specific provider'
|
||||||
type: string
|
type: string
|
||||||
default: 'ollama'
|
default: 'ollama'
|
||||||
|
test-subdirs:
|
||||||
|
description: 'Comma-separated list of test subdirectories to run'
|
||||||
|
type: string
|
||||||
|
default: ''
|
||||||
|
test-pattern:
|
||||||
|
description: 'Regex pattern to pass to pytest -k'
|
||||||
|
type: string
|
||||||
|
default: ''
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
# Skip concurrency for pushes to main - each commit should be tested independently
|
# Skip concurrency for pushes to main - each commit should be tested independently
|
||||||
|
@ -38,28 +46,8 @@ concurrency:
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
discover-tests:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
test-types: ${{ steps.generate-test-types.outputs.test-types }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
||||||
|
|
||||||
- name: Generate test types
|
|
||||||
id: generate-test-types
|
|
||||||
run: |
|
|
||||||
# Get test directories dynamically, excluding non-test directories
|
|
||||||
# NOTE: we are excluding post_training since the tests take too long
|
|
||||||
TEST_TYPES=$(find tests/integration -maxdepth 1 -mindepth 1 -type d |
|
|
||||||
sed 's|tests/integration/||' |
|
|
||||||
grep -Ev "^(__pycache__|fixtures|test_cases|recordings|non_ci|post_training)$" |
|
|
||||||
sort | jq -R -s -c 'split("\n")[:-1]')
|
|
||||||
echo "test-types=$TEST_TYPES" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
run-replay-mode-tests:
|
run-replay-mode-tests:
|
||||||
needs: discover-tests
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: ${{ format('Integration Tests ({0}, {1}, {2}, client={3}, vision={4})', matrix.client-type, matrix.provider, matrix.python-version, matrix.client-version, matrix.run-vision-tests) }}
|
name: ${{ format('Integration Tests ({0}, {1}, {2}, client={3}, vision={4})', matrix.client-type, matrix.provider, matrix.python-version, matrix.client-version, matrix.run-vision-tests) }}
|
||||||
|
|
||||||
|
@ -90,7 +78,8 @@ jobs:
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
uses: ./.github/actions/run-and-record-tests
|
uses: ./.github/actions/run-and-record-tests
|
||||||
with:
|
with:
|
||||||
test-types: ${{ needs.discover-tests.outputs.test-types }}
|
test-subdirs: ${{ inputs.test-subdirs }}
|
||||||
|
test-pattern: ${{ inputs.test-pattern }}
|
||||||
stack-config: ${{ matrix.client-type == 'library' && 'ci-tests' || 'server:ci-tests' }}
|
stack-config: ${{ matrix.client-type == 'library' && 'ci-tests' || 'server:ci-tests' }}
|
||||||
provider: ${{ matrix.provider }}
|
provider: ${{ matrix.provider }}
|
||||||
inference-mode: 'replay'
|
inference-mode: 'replay'
|
||||||
|
|
90
.github/workflows/record-integration-tests.yml
vendored
90
.github/workflows/record-integration-tests.yml
vendored
|
@ -1,88 +1,39 @@
|
||||||
|
# This workflow should be run manually when needing to re-record tests. This happens when you have
|
||||||
|
# - added a new test
|
||||||
|
# - or changed an existing test such that a new inference call is made
|
||||||
|
# You should make a PR and then run this workflow on that PR branch. The workflow will re-record the
|
||||||
|
# tests and commit the recordings to the PR branch.
|
||||||
name: Integration Tests (Record)
|
name: Integration Tests (Record)
|
||||||
|
|
||||||
run-name: Run the integration test suite from tests/integration
|
run-name: Run the integration test suite from tests/integration
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
|
||||||
branches: [ main ]
|
|
||||||
types: [opened, synchronize, labeled]
|
|
||||||
paths:
|
|
||||||
- 'llama_stack/**'
|
|
||||||
- 'tests/**'
|
|
||||||
- 'uv.lock'
|
|
||||||
- 'pyproject.toml'
|
|
||||||
- '.github/workflows/record-integration-tests.yml' # This workflow
|
|
||||||
- '.github/actions/setup-ollama/action.yml'
|
|
||||||
- '.github/actions/setup-test-environment/action.yml'
|
|
||||||
- '.github/actions/run-and-record-tests/action.yml'
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
|
test-subdirs:
|
||||||
|
description: 'Comma-separated list of test subdirectories to run'
|
||||||
|
type: string
|
||||||
|
default: ''
|
||||||
test-provider:
|
test-provider:
|
||||||
description: 'Test against a specific provider'
|
description: 'Test against a specific provider'
|
||||||
type: string
|
type: string
|
||||||
default: 'ollama'
|
default: 'ollama'
|
||||||
|
run-vision-tests:
|
||||||
concurrency:
|
description: 'Whether to run vision tests'
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
type: boolean
|
||||||
cancel-in-progress: true
|
default: false
|
||||||
|
test-pattern:
|
||||||
|
description: 'Regex pattern to pass to pytest -k'
|
||||||
|
type: string
|
||||||
|
default: ''
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
discover-tests:
|
|
||||||
if: contains(github.event.pull_request.labels.*.name, 're-record-tests') ||
|
|
||||||
contains(github.event.pull_request.labels.*.name, 're-record-vision-tests')
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
test-types: ${{ steps.generate-test-types.outputs.test-types }}
|
|
||||||
matrix-modes: ${{ steps.generate-test-types.outputs.matrix-modes }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
||||||
|
|
||||||
- name: Generate test types
|
|
||||||
id: generate-test-types
|
|
||||||
run: |
|
|
||||||
# Get test directories dynamically, excluding non-test directories
|
|
||||||
TEST_TYPES=$(find tests/integration -maxdepth 1 -mindepth 1 -type d -printf "%f\n" |
|
|
||||||
grep -Ev "^(__pycache__|fixtures|test_cases|recordings|post_training)$" |
|
|
||||||
sort | jq -R -s -c 'split("\n")[:-1]')
|
|
||||||
echo "test-types=$TEST_TYPES" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
labels=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name')
|
|
||||||
echo "labels=$labels"
|
|
||||||
|
|
||||||
modes_array=()
|
|
||||||
if [[ $labels == *"re-record-vision-tests"* ]]; then
|
|
||||||
modes_array+=("vision")
|
|
||||||
fi
|
|
||||||
if [[ $labels == *"re-record-tests"* ]]; then
|
|
||||||
modes_array+=("non-vision")
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Convert to JSON array
|
|
||||||
if [ ${#modes_array[@]} -eq 0 ]; then
|
|
||||||
matrix_modes="[]"
|
|
||||||
else
|
|
||||||
matrix_modes=$(printf '%s\n' "${modes_array[@]}" | jq -R -s -c 'split("\n")[:-1]')
|
|
||||||
fi
|
|
||||||
echo "matrix_modes=$matrix_modes"
|
|
||||||
echo "matrix-modes=$matrix_modes" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ github.token }}
|
|
||||||
|
|
||||||
record-tests:
|
record-tests:
|
||||||
needs: discover-tests
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
mode: ${{ fromJSON(needs.discover-tests.outputs.matrix-modes) }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
@ -96,14 +47,15 @@ jobs:
|
||||||
python-version: "3.12" # Use single Python version for recording
|
python-version: "3.12" # Use single Python version for recording
|
||||||
client-version: "latest"
|
client-version: "latest"
|
||||||
provider: ${{ inputs.test-provider || 'ollama' }}
|
provider: ${{ inputs.test-provider || 'ollama' }}
|
||||||
run-vision-tests: ${{ matrix.mode == 'vision' && 'true' || 'false' }}
|
run-vision-tests: ${{ inputs.run-vision-tests }}
|
||||||
inference-mode: 'record'
|
inference-mode: 'record'
|
||||||
|
|
||||||
- name: Run and record tests
|
- name: Run and record tests
|
||||||
uses: ./.github/actions/run-and-record-tests
|
uses: ./.github/actions/run-and-record-tests
|
||||||
with:
|
with:
|
||||||
test-types: ${{ needs.discover-tests.outputs.test-types }}
|
test-pattern: ${{ inputs.test-pattern }}
|
||||||
|
test-subdirs: ${{ inputs.test-subdirs }}
|
||||||
stack-config: 'server:ci-tests' # recording must be done with server since more tests are run
|
stack-config: 'server:ci-tests' # recording must be done with server since more tests are run
|
||||||
provider: ${{ inputs.test-provider || 'ollama' }}
|
provider: ${{ inputs.test-provider || 'ollama' }}
|
||||||
inference-mode: 'record'
|
inference-mode: 'record'
|
||||||
run-vision-tests: ${{ matrix.mode == 'vision' && 'true' || 'false' }}
|
run-vision-tests: ${{ inputs.run-vision-tests }}
|
||||||
|
|
|
@ -14,7 +14,8 @@ set -euo pipefail
|
||||||
# Default values
|
# Default values
|
||||||
STACK_CONFIG=""
|
STACK_CONFIG=""
|
||||||
PROVIDER=""
|
PROVIDER=""
|
||||||
TEST_TYPES='["inference"]'
|
TEST_SUBDIRS=""
|
||||||
|
TEST_PATTERN=""
|
||||||
RUN_VISION_TESTS="false"
|
RUN_VISION_TESTS="false"
|
||||||
INFERENCE_MODE="replay"
|
INFERENCE_MODE="replay"
|
||||||
EXTRA_PARAMS=""
|
EXTRA_PARAMS=""
|
||||||
|
@ -27,23 +28,24 @@ Usage: $0 [OPTIONS]
|
||||||
Options:
|
Options:
|
||||||
--stack-config STRING Stack configuration to use (required)
|
--stack-config STRING Stack configuration to use (required)
|
||||||
--provider STRING Provider to use (ollama, vllm, etc.) (required)
|
--provider STRING Provider to use (ollama, vllm, etc.) (required)
|
||||||
--test-types JSON JSON array of test types to run (default: '["inference"]')
|
--test-subdirs STRING Comma-separated list of test subdirectories to run (default: 'inference')
|
||||||
--run-vision-tests Run vision tests instead of regular tests
|
--run-vision-tests Run vision tests instead of regular tests
|
||||||
--inference-mode STRING Inference mode: record or replay (default: replay)
|
--inference-mode STRING Inference mode: record or replay (default: replay)
|
||||||
|
--test-pattern STRING Regex pattern to pass to pytest -k
|
||||||
--help Show this help message
|
--help Show this help message
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
# Basic inference tests with ollama
|
# Basic inference tests with ollama
|
||||||
$0 --stack-config server:ollama --provider ollama
|
$0 --stack-config server:ci-tests --provider ollama
|
||||||
|
|
||||||
# Multiple test types with vllm
|
# Multiple test directories with vllm
|
||||||
$0 --stack-config server:vllm --provider vllm --test-types '["inference", "agents"]'
|
$0 --stack-config server:ci-tests --provider vllm --test-subdirs 'inference,agents'
|
||||||
|
|
||||||
# Vision tests with ollama
|
# Vision tests with ollama
|
||||||
$0 --stack-config server:ollama --provider ollama --run-vision-tests
|
$0 --stack-config server:ci-tests --provider ollama --run-vision-tests
|
||||||
|
|
||||||
# Record mode for updating test recordings
|
# Record mode for updating test recordings
|
||||||
$0 --stack-config server:ollama --provider ollama --inference-mode record
|
$0 --stack-config server:ci-tests --provider ollama --inference-mode record
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,8 +60,8 @@ while [[ $# -gt 0 ]]; do
|
||||||
PROVIDER="$2"
|
PROVIDER="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
--test-types)
|
--test-subdirs)
|
||||||
TEST_TYPES="$2"
|
TEST_SUBDIRS="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
--run-vision-tests)
|
--run-vision-tests)
|
||||||
|
@ -70,6 +72,10 @@ while [[ $# -gt 0 ]]; do
|
||||||
INFERENCE_MODE="$2"
|
INFERENCE_MODE="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
|
--test-pattern)
|
||||||
|
TEST_PATTERN="$2"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
--help)
|
--help)
|
||||||
usage
|
usage
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -99,9 +105,10 @@ fi
|
||||||
echo "=== Llama Stack Integration Test Runner ==="
|
echo "=== Llama Stack Integration Test Runner ==="
|
||||||
echo "Stack Config: $STACK_CONFIG"
|
echo "Stack Config: $STACK_CONFIG"
|
||||||
echo "Provider: $PROVIDER"
|
echo "Provider: $PROVIDER"
|
||||||
echo "Test Types: $TEST_TYPES"
|
echo "Test Subdirs: $TEST_SUBDIRS"
|
||||||
echo "Vision Tests: $RUN_VISION_TESTS"
|
echo "Vision Tests: $RUN_VISION_TESTS"
|
||||||
echo "Inference Mode: $INFERENCE_MODE"
|
echo "Inference Mode: $INFERENCE_MODE"
|
||||||
|
echo "Test Pattern: $TEST_PATTERN"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Check storage and memory before tests
|
# Check storage and memory before tests
|
||||||
|
@ -164,16 +171,21 @@ if [[ "$PROVIDER" == "vllm" ]]; then
|
||||||
EXCLUDE_TESTS="${EXCLUDE_TESTS} or test_inference_store_tool_calls"
|
EXCLUDE_TESTS="${EXCLUDE_TESTS} or test_inference_store_tool_calls"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
PYTEST_PATTERN="not( $EXCLUDE_TESTS )"
|
||||||
|
if [[ -n "$TEST_PATTERN" ]]; then
|
||||||
|
PYTEST_PATTERN="${PYTEST_PATTERN} and $TEST_PATTERN"
|
||||||
|
fi
|
||||||
|
|
||||||
# Run vision tests if specified
|
# Run vision tests if specified
|
||||||
if [[ "$RUN_VISION_TESTS" == "true" ]]; then
|
if [[ "$RUN_VISION_TESTS" == "true" ]]; then
|
||||||
echo "Running vision tests..."
|
echo "Running vision tests..."
|
||||||
if uv run pytest -s -v tests/integration/inference/test_vision_inference.py \
|
if uv run pytest -s -v tests/integration/inference/test_vision_inference.py \
|
||||||
--stack-config="$STACK_CONFIG" \
|
--stack-config="$STACK_CONFIG" \
|
||||||
-k "not( $EXCLUDE_TESTS )" \
|
-k "$PYTEST_PATTERN" \
|
||||||
--vision-model=ollama/llama3.2-vision:11b \
|
--vision-model=ollama/llama3.2-vision:11b \
|
||||||
--embedding-model=sentence-transformers/all-MiniLM-L6-v2 \
|
--embedding-model=sentence-transformers/all-MiniLM-L6-v2 \
|
||||||
--color=yes $EXTRA_PARAMS \
|
--color=yes $EXTRA_PARAMS \
|
||||||
--capture=tee-sys | tee pytest-${INFERENCE_MODE}-vision.log; then
|
--capture=tee-sys; then
|
||||||
echo "✅ Vision tests completed successfully"
|
echo "✅ Vision tests completed successfully"
|
||||||
else
|
else
|
||||||
echo "❌ Vision tests failed"
|
echo "❌ Vision tests failed"
|
||||||
|
@ -183,28 +195,34 @@ if [[ "$RUN_VISION_TESTS" == "true" ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run regular tests
|
# Run regular tests
|
||||||
echo "Test types to run: $TEST_TYPES"
|
if [[ -z "$TEST_SUBDIRS" ]]; then
|
||||||
|
TEST_SUBDIRS=$(find tests/integration -maxdepth 1 -mindepth 1 -type d |
|
||||||
|
sed 's|tests/integration/||' |
|
||||||
|
grep -Ev "^(__pycache__|fixtures|test_cases|recordings|non_ci|post_training)$" |
|
||||||
|
sort)
|
||||||
|
fi
|
||||||
|
echo "Test subdirs to run: $TEST_SUBDIRS"
|
||||||
|
|
||||||
# Collect all test files for the specified test types
|
# Collect all test files for the specified test types
|
||||||
TEST_FILES=""
|
TEST_FILES=""
|
||||||
for test_type in $(echo "$TEST_TYPES" | jq -r '.[]'); do
|
for test_subdir in $(echo "$TEST_SUBDIRS" | tr ',' '\n'); do
|
||||||
# Skip certain test types for vllm provider
|
# Skip certain test types for vllm provider
|
||||||
if [[ "$PROVIDER" == "vllm" ]]; then
|
if [[ "$PROVIDER" == "vllm" ]]; then
|
||||||
if [[ "$test_type" == "safety" ]] || [[ "$test_type" == "post_training" ]] || [[ "$test_type" == "tool_runtime" ]]; then
|
if [[ "$test_subdir" == "safety" ]] || [[ "$test_subdir" == "post_training" ]] || [[ "$test_subdir" == "tool_runtime" ]]; then
|
||||||
echo "Skipping $test_type for vllm provider"
|
echo "Skipping $test_subdir for vllm provider"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -d "tests/integration/$test_type" ]]; then
|
if [[ -d "tests/integration/$test_subdir" ]]; then
|
||||||
# Find all Python test files in this directory
|
# Find all Python test files in this directory
|
||||||
test_files=$(find tests/integration/$test_type -name "test_*.py" -o -name "*_test.py")
|
test_files=$(find tests/integration/$test_subdir -name "test_*.py" -o -name "*_test.py")
|
||||||
if [[ -n "$test_files" ]]; then
|
if [[ -n "$test_files" ]]; then
|
||||||
TEST_FILES="$TEST_FILES $test_files"
|
TEST_FILES="$TEST_FILES $test_files"
|
||||||
echo "Added test files from $test_type: $(echo $test_files | wc -w) files"
|
echo "Added test files from $test_subdir: $(echo $test_files | wc -w) files"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Warning: Directory tests/integration/$test_type does not exist"
|
echo "Warning: Directory tests/integration/$test_subdir does not exist"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -217,14 +235,21 @@ echo ""
|
||||||
echo "=== Running all collected tests in a single pytest command ==="
|
echo "=== Running all collected tests in a single pytest command ==="
|
||||||
echo "Total test files: $(echo $TEST_FILES | wc -w)"
|
echo "Total test files: $(echo $TEST_FILES | wc -w)"
|
||||||
|
|
||||||
if uv run pytest -s -v $TEST_FILES \
|
set +e
|
||||||
|
uv run pytest -s -v $TEST_FILES \
|
||||||
--stack-config="$STACK_CONFIG" \
|
--stack-config="$STACK_CONFIG" \
|
||||||
-k "not( $EXCLUDE_TESTS )" \
|
-k "$PYTEST_PATTERN" \
|
||||||
--text-model="$TEXT_MODEL" \
|
--text-model="$TEXT_MODEL" \
|
||||||
--embedding-model=sentence-transformers/all-MiniLM-L6-v2 \
|
--embedding-model=sentence-transformers/all-MiniLM-L6-v2 \
|
||||||
--color=yes $EXTRA_PARAMS \
|
--color=yes $EXTRA_PARAMS \
|
||||||
--capture=tee-sys | tee pytest-${INFERENCE_MODE}-all.log; then
|
--capture=tee-sys
|
||||||
|
exit_code=$?
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ $exit_code -eq 0 ]; then
|
||||||
echo "✅ All tests completed successfully"
|
echo "✅ All tests completed successfully"
|
||||||
|
elif [ $exit_code -eq 5 ]; then
|
||||||
|
echo "⚠️ No tests collected (pattern matched no tests)"
|
||||||
else
|
else
|
||||||
echo "❌ Tests failed"
|
echo "❌ Tests failed"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue