From 563675f6ef4f9976152de2d87b531686b29cdbfa Mon Sep 17 00:00:00 2001 From: wangdl Date: Fri, 19 Jun 2026 22:53:47 +0800 Subject: [PATCH] fix: use docker exec for MySQL check in CI script mysqladmin may not be in CI runner PATH. Use docker exec mysql mysqladmin ping instead, which works from the Gitea Actions runner. Co-Authored-By: Claude Opus 4.7 --- test/run-integration-ci.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/run-integration-ci.sh b/test/run-integration-ci.sh index 0373610..ed69a28 100644 --- a/test/run-integration-ci.sh +++ b/test/run-integration-ci.sh @@ -10,10 +10,10 @@ REDIS_H="${REDIS_HOST:-127.0.0.1}" REDIS_P="${REDIS_PORT:-6379}" REDIS_PW="${REDIS_PASSWORD:-}" -# 1. Check MySQL +# 1. Check MySQL (via docker exec since mysqladmin may not be in CI PATH) echo "[1/7] Checking MySQL..." -mysqladmin ping -h "${REDIS_H}" -u root -p"${MYSQL_ROOT_PASSWORD:-root}" --silent 2>/dev/null || { - echo "MySQL not reachable; ensure MySQL is running" +docker exec mysql mysqladmin ping -u root -p"${MYSQL_ROOT_PASSWORD:-root}" --silent 2>/dev/null || { + echo "MySQL not reachable via docker; ensure MySQL container is running" exit 1 }