Files
smart-speaker/scripts/qwen-check.sh

25 lines
564 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT"
echo "[qwen-check] Python syntax compile check"
python -m compileall app run.py >/dev/null
echo "[qwen-check] Optional ruff check"
if command -v ruff >/dev/null 2>&1; then
ruff check app run.py
else
echo "[qwen-check] ruff not installed, skipping"
fi
echo "[qwen-check] Optional pytest"
if command -v pytest >/dev/null 2>&1 && [ -d tests ]; then
pytest -q
else
echo "[qwen-check] tests/ or pytest not found, skipping"
fi
echo "[qwen-check] Done"