Try different port

This commit is contained in:
Art4 2024-11-07 13:47:02 +00:00
parent 5601c8b6a1
commit 10497e9231

View file

@ -9,14 +9,14 @@ jobs:
services: services:
mariadb: mariadb:
image: mariadb:11.1 image: mariadb:latest
env: env:
MYSQL_ALLOW_EMPTY_PASSWORD: true MYSQL_ALLOW_EMPTY_PASSWORD: true
MYSQL_DATABASE: test MYSQL_DATABASE: test
MYSQL_PASSWORD: test MYSQL_PASSWORD: test
MYSQL_USER: test MYSQL_USER: test
ports: ports:
- 3306/tcp - 33306/tcp
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
redis: redis:
@ -61,7 +61,7 @@ jobs:
- name: Verify MariaDB connection - name: Verify MariaDB connection
env: env:
PORT: ${{ job.services.mariadb.ports[3306] }} PORT: ${{ job.services.mariadb.ports[33306] }}
run: | run: |
while ! mysqladmin ping -h"127.0.0.1" -P"$PORT" --silent; do while ! mysqladmin ping -h"127.0.0.1" -P"$PORT" --silent; do
sleep 1 sleep 1
@ -69,7 +69,7 @@ jobs:
- name: Setup MYSQL database - name: Setup MYSQL database
env: env:
PORT: ${{ job.services.mariadb.ports[3306] }} PORT: ${{ job.services.mariadb.ports[33306] }}
run: | run: |
mysql -h"127.0.0.1" -P"$PORT" -utest -ptest test < database.sql mysql -h"127.0.0.1" -P"$PORT" -utest -ptest test < database.sql
@ -77,7 +77,7 @@ jobs:
run: $(git rev-parse --show-toplevel)/bin/phpunit --configuration tests/phpunit.xml --coverage-clover clover.xml run: $(git rev-parse --show-toplevel)/bin/phpunit --configuration tests/phpunit.xml --coverage-clover clover.xml
env: env:
MYSQL_HOST: 127.0.0.1 MYSQL_HOST: 127.0.0.1
MYSQL_PORT: ${{ job.services.mariadb.ports[3306] }} MYSQL_PORT: ${{ job.services.mariadb.ports[33306] }}
MYSQL_DATABASE: test MYSQL_DATABASE: test
MYSQL_PASSWORD: test MYSQL_PASSWORD: test
MYSQL_USER: test MYSQL_USER: test