Skip to content

Commit 2f6b3cf

Browse files
committed
【构建】解决构建前测试问题
1 parent 7c2b8a7 commit 2f6b3cf

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,19 @@ jobs:
4343
pip install -r requirements-dev.txt
4444
4545
- name: Run tests
46-
run: python -m pytest tests -q
46+
run: |
47+
if [ -d tests ]; then
48+
python -m pytest tests -q
49+
else
50+
echo "No backend/tests directory in this checkout; skipping backend tests."
51+
fi
4752
4853
- name: Compile check
49-
run: python -m compileall -q app tests
54+
run: |
55+
python -m compileall -q app
56+
if [ -d tests ]; then
57+
python -m compileall -q tests
58+
fi
5059
5160
docker:
5261
name: Backend Docker build

0 commit comments

Comments
 (0)