Files
wehub-resource-sync 534bb94eea
Test Migrations / Migrations (SQLite) (push) Has been cancelled
Build Dev Image / build-dev-image (push) Has been cancelled
Check i18n Keys / Check i18n Key Consistency (push) Has been cancelled
Lint / Ruff Lint & Format (push) Has been cancelled
Lint / Frontend Lint (push) Has been cancelled
Test Migrations / Migrations (PostgreSQL) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:44:22 +08:00

32 lines
684 B
Bash
Executable File

#!/bin/bash
# Script to run all unit tests
# This script helps avoid circular import issues by setting up the environment properly
set -e
echo "Setting up test environment..."
# Activate virtual environment if it exists
if [ -d ".venv" ]; then
source .venv/bin/activate
fi
# Check if pytest is installed
if ! command -v pytest &> /dev/null; then
echo "Installing test dependencies..."
pip install pytest pytest-asyncio pytest-cov
fi
echo "Running all unit tests..."
# Run tests with coverage
pytest tests/unit_tests/ -v --tb=short \
--cov=langbot \
--cov-report=xml \
"$@"
echo ""
echo "Test run complete!"
echo "Coverage report saved to coverage.xml"