fix: 移除 mysqladmin/redis-cli 宿主机依赖,用 docker start + Prisma migrate 验证
Some checks failed
Deploy API Server / build-and-unit (push) Successful in 33s
Deploy API Server / current-integration (push) Successful in 30s
Deploy API Server / backward-compat (push) Successful in 17s
Deploy API Server / m-ai-03-synthetic-e2e (push) Failing after 12s
Deploy API Server / deploy (push) Has been skipped

CI 宿主机无 mysqladmin/redis-cli。MySQL/Redis 在 Docker 容器中。
- docker start 启动已有容器
- prisma migrate deploy 验证 MySQL 连接
- Gate E2E assertInfra() TCP 端口探测兜底

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
wangdl 2026-06-21 11:19:45 +08:00
parent 89ae30d46f
commit 14c87ea59f

View File

@ -315,30 +315,6 @@ jobs:
DATABASE_URL="${{ secrets.DATABASE_URL }}" npx prisma migrate deploy DATABASE_URL="${{ secrets.DATABASE_URL }}" npx prisma migrate deploy
timeout-minutes: 5 timeout-minutes: 5
- name: Wait for MySQL health
run: |
for i in $(seq 1 60); do
if mysqladmin ping -h 127.0.0.1 -u root --password="${{ secrets.DB_ROOT_PASSWORD || '' }}" 2>/dev/null; then
echo "MySQL ready" && exit 0
fi
echo "Waiting for MySQL... $i/60"
sleep 1
done
echo "ERROR: MySQL not ready after 60s" && exit 1
timeout-minutes: 2
- name: Wait for Redis health
run: |
for i in $(seq 1 30); do
if redis-cli ping 2>/dev/null | grep -q PONG; then
echo "Redis ready" && exit 0
fi
echo "Waiting for Redis... $i/30"
sleep 1
done
echo "ERROR: Redis not ready after 30s" && exit 1
timeout-minutes: 1
- name: M-AI-03 Gate E2E - name: M-AI-03 Gate E2E
run: | run: |
cd $WORKDIR cd $WORKDIR