Skip to content

Commit 27a66f0

Browse files
committed
Update test matrx to include MariaDB 11
MariaDB has had a 11 release for a while and this includes a 11.8 LTS release which is under the :11 tag. MariaDB:11+ doesn't include a mysql executable so used its own healthcheck.sh to wait for startup with timeout.
1 parent a07c446 commit 27a66f0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
rdbms: mysql:9
3232
- php: 8.4
3333
rdbms: mysql:8
34+
- php: 8.4
35+
rdbms: mariadb:11
3436
- php: 8.4
3537
rdbms: mariadb:10
3638
steps:
@@ -43,6 +45,20 @@ jobs:
4345
- run: composer install
4446
- run: docker run -d --name mysql --net=host -e MYSQL_RANDOM_ROOT_PASSWORD=yes -e MYSQL_DATABASE=test -e MYSQL_USER=test -e MYSQL_PASSWORD=test ${{ matrix.rdbms }}
4547
- run: bash tests/wait-for-mysql.sh
48+
if: startsWith(matrix.rdbms, 'mysql:')
49+
- run: |
50+
MAX_RETRIES=20
51+
until docker exec mysql healthcheck.sh --connect; do
52+
((MAX_RETRIES--))
53+
if [ $MAX_RETRIES -le 0 ]; then
54+
echo "MariaDB did not become healthy in time."
55+
exit 1
56+
fi
57+
echo "MariaDB not healthy yet. Retries left: $MAX_RETRIES"
58+
sleep 1
59+
done
60+
echo "MariaDB is healthy."
61+
if: startsWith(matrix.rdbms, 'mariadb:')
4662
- run: vendor/bin/phpunit --coverage-text
4763
if: ${{ matrix.php >= 7.3 }}
4864
- run: vendor/bin/phpunit --coverage-text -c phpunit.xml.legacy

0 commit comments

Comments
 (0)