Files
awoooi/.gitea/workflows/e2e-health.yaml
OG T a0ef323d75
Some checks failed
E2E Health Check / e2e-health (push) Failing after 11s
fix(ci): 使用 host network 訪問 K8s NodePort
2026-03-29 22:09:56 +08:00

73 lines
1.9 KiB
YAML

# =============================================================================
# AWOOOI E2E Health Check (Gitea Actions - 方案 B)
# =============================================================================
# 替代 GitHub Actions 的本地 CI/CD
# 2026-03-29 Claude Code
name: E2E Health Check
on:
push:
branches: [main]
workflow_dispatch:
jobs:
e2e-health:
runs-on: ubuntu-latest
container:
image: ubuntu:24.04
options: --network host
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install uv
run: pip install uv
- name: Install dependencies
working-directory: apps/api
run: uv sync
- name: Check API Health
run: |
API_URL="http://192.168.0.121:32334"
echo "🔗 檢查 API 健康狀態..."
for i in 1 2 3; do
HTTP_CODE=$(curl -s -w "%{http_code}" -o /dev/null --connect-timeout 10 "$API_URL/api/v1/health" 2>&1) || true
echo "📊 嘗試 #$i: HTTP $HTTP_CODE"
if [ "$HTTP_CODE" = "200" ]; then
echo "✅ API 可用"
exit 0
fi
sleep 2
done
echo "❌ API 無法連線"
exit 1
- name: Run E2E Verification
working-directory: apps/api
env:
WEBHOOK_HMAC_SECRET: ${{ secrets.WEBHOOK_HMAC_SECRET }}
run: |
API_URL="http://192.168.0.121:32334"
for i in 1 2 3; do
echo "📡 E2E 嘗試 #$i..."
if uv run python -m scripts.e2e_tool_call_verification --api-url "$API_URL" --dry-run; then
echo "✅ E2E 驗證通過"
exit 0
fi
sleep 5
done
echo "❌ E2E 驗證失敗"
exit 1
# 2026-03-29 Claude Code: 網絡配置修復後測試