Skip to content

Commit 2b9b044

Browse files
authored
Fix MariaDB health check (#618)
1 parent 0d6daa3 commit 2b9b044

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/phpstan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ jobs:
6060

6161
# https://docs.github.com/en/free-pro-team@latest/actions/guides/about-service-containers
6262
services:
63-
mysql:
63+
database:
6464
image: ${{ matrix.db-image }}
6565
env:
6666
MYSQL_ROOT_PASSWORD: root
6767
ports:
6868
- 3306:3306
69-
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
69+
options: ${{ startsWith(matrix.db-image, 'mariadb') && '--health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=1s --health-timeout=10s --health-retries=60' || '--health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3' }}
7070

7171
steps:
7272
- uses: actions/checkout@v3

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
concurrency:
1010
group: tests-${{ github.head_ref || github.run_id }} # will be canceled on subsequent pushes in pull requests but not branches
1111
cancel-in-progress: true
12-
12+
1313
jobs:
1414

1515
phpunit:
@@ -97,13 +97,13 @@ jobs:
9797

9898
# https://docs.github.com/en/free-pro-team@latest/actions/guides/about-service-containers
9999
services:
100-
mysql:
100+
database:
101101
image: ${{ matrix.db-image }}
102102
env:
103103
MYSQL_ROOT_PASSWORD: root
104104
ports:
105105
- 3306:3306
106-
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
106+
options: ${{ startsWith(matrix.db-image, 'mariadb') && '--health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=1s --health-timeout=10s --health-retries=60' || '--health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3' }}
107107

108108
steps:
109109
- uses: actions/checkout@v3

0 commit comments

Comments
 (0)