ci: 加 debug 信息定位 test failure 根因
CI / lint (pull_request) Successful in 6s
CI / test (pull_request) Failing after 6s
CI / notify-on-failure (pull_request) Successful in 2s

This commit is contained in:
cfdaily
2026-06-14 00:16:11 +08:00
parent 4ef9f68ff3
commit 925ebe8556
+11 -1
View File
@@ -45,9 +45,19 @@ jobs:
python3 -m venv /tmp/ci-venv-test
/tmp/ci-venv-test/bin/pip install --quiet fastapi pydantic pyyaml uvicorn requests pytest pytest-asyncio httpx
- name: Debug environment
run: |
echo "PWD=$(pwd)"
echo "PYTHONPATH=$PYTHONPATH"
python3 -c "import sys; [print(p) for p in sys.path if 'sanguo' in p.lower() or 'openclaw' in p.lower()]"
grep -c "assignee = agent_id" src/daemon/toolchain_handler.py || true
grep -c "_BUSINESS_FAIL_THRESHOLD" src/daemon/toolchain_handler.py || true
- name: Run tests (exclude E2E)
run: |
PYTHONPATH=. /tmp/ci-venv-test/bin/pytest tests/ -m "not e2e" -x -q
PYTHONPATH=$(pwd) /tmp/ci-venv-test/bin/pytest tests/ -m "not e2e" -x -q || \
(echo '=== RETRY WITH VERBOSE ===' && \
PYTHONPATH=$(pwd) /tmp/ci-venv-test/bin/pytest tests/ -m "not e2e" -x -v 2>&1 | tail -30)
# ── Job 3: CI 失败通知 ───────────────────────────────
# 使用 needs.<job>.result 直接判断,不查询 commit status API