From 965dc8845554060ecd635008b86c8292055c65f3 Mon Sep 17 00:00:00 2001 From: myrmidex Date: Sat, 2 May 2026 10:33:06 +0200 Subject: [PATCH] 27 - Fix CI: drop service healthcheck, use nc wait loop for MySQL --- .forgejo/workflows/ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index bf7fd95..4f0f824 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -20,7 +20,6 @@ jobs: MYSQL_USER: incr_user MYSQL_PASSWORD: incr_password MYSQL_ROOT_PASSWORD: root_password - options: --health-cmd="mysql -u root -proot_password -e 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=12 steps: - uses: https://data.forgejo.org/actions/checkout@v4 @@ -45,6 +44,14 @@ jobs: - name: Prepare environment run: cp .env.testing .env + - name: Wait for MySQL + run: | + for i in $(seq 1 30); do + nc -z db 3306 && echo "MySQL is up" && break + echo "Waiting for MySQL... ($i/30)" + sleep 2 + done + - name: Run migrations run: php artisan migrate --force