This commit is contained in:
Ashwin Bharambe 2025-08-15 12:42:42 -07:00
parent 6fa5f2b7ec
commit 34cb120509
2 changed files with 13 additions and 6 deletions

View file

@ -1,7 +1,7 @@
# This workflow should be run manually when needing to re-record tests. This happens when you have # This workflow should be run manually when needing to re-record tests. This happens when you have
# - added a new test # - added a new test
# - or changed an existing test such that a new inference call is made # - 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 # 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. # tests and commit the recordings to the PR branch.
name: Integration Tests (Record) name: Integration Tests (Record)

View file

@ -31,7 +31,7 @@ Options:
--test-subdirs STRING Comma-separated list of test subdirectories 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 --test-pattern STRING Regex pattern to pass to pytest -k
--help Show this help message --help Show this help message
Examples: Examples:
@ -179,19 +179,26 @@ 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 \ set +e
uv run pytest -s -v tests/integration/inference/test_vision_inference.py \
--stack-config="$STACK_CONFIG" \ --stack-config="$STACK_CONFIG" \
-k "$PYTEST_PATTERN" \ -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; then --capture=tee-sys
exit_code=$?
set -e
if [ $exit_code -eq 0 ]; then
echo "✅ Vision tests completed successfully" echo "✅ Vision tests completed successfully"
elif [ $exit_code -eq 5 ]; then
echo "⚠️ No vision tests collected (pattern matched no tests)"
exit 0
else else
echo "❌ Vision tests failed" echo "❌ Vision tests failed"
exit 1 exit 1
fi fi
exit 0
fi fi
# Run regular tests # Run regular tests