ci: handle missing backend tests safely
This commit is contained in:
@@ -60,7 +60,13 @@ jobs:
|
||||
run: pip-audit -r platform/backend/requirements.txt
|
||||
|
||||
- name: Run Backend Quant Engine Tests
|
||||
run: pytest platform/backend/app/analytics/
|
||||
run: |
|
||||
if find platform/backend -type f \( -name 'test_*.py' -o -name '*_test.py' \) | grep -q .; then
|
||||
pytest platform/backend
|
||||
else
|
||||
echo "未找到後端 pytest 測試檔,改以 Python 編譯檢查作為最低安全閘門。"
|
||||
python -m compileall -q platform/backend/app
|
||||
fi
|
||||
|
||||
- name: Setup Node.js Environment
|
||||
uses: actions/setup-node@v4
|
||||
|
||||
Reference in New Issue
Block a user