1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
#!/bin/sh
# script/test: Run test suite with optional file path argument
set -e
cd "$(dirname "$0")/.."
[ -z "$DEBUG" ] || set -x
if [ "$CI" = "true" ]; then
# CI environment - don't update, assume dependencies are already installed
echo "==> Running tests in CI environment..."
else
# Development environment - ensure everything is up to date
script/update
fi
echo "==> Running tests..."
if [ -n "$1" ]; then
# Run specific test file if provided
uv run --dev pytest --timeout=10 "$1" -rxf -x -vv -l -s --cov=./ --cov-report=xml
else
# Run all tests
uv run --dev pytest --timeout=10 tests -rxf -x -vv -l -s --cov=./ --cov-report=xml
fi
|