From 595eaaff5bbc2f2a91c965558d454b87f21257f2 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Wed, 24 Apr 2024 09:28:27 +1000 Subject: [PATCH] github: mariadb database healthcheck+naming MariaDB's container has a healthcheck.sh script that can be used. mysqladmin ping has flaw that it checks unix socket first which means it can return true while the database is been bootstrapped. Also use the MariaDB names as we haven't been MySQL for a while. --- .github/workflows/databases.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/databases.yml b/.github/workflows/databases.yml index 63f1aef541a6..0a1c2dac6c74 100644 --- a/.github/workflows/databases.yml +++ b/.github/workflows/databases.yml @@ -103,14 +103,14 @@ jobs: runs-on: ubuntu-22.04 services: - mysql: + mariadb: image: mariadb:10 env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes - MYSQL_DATABASE: laravel + MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: yes + MARIADB_DATABASE: laravel ports: - 3306:3306 - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3 strategy: fail-fast: true