diff --git a/.github/workflows/REUSABLE_backend.yml b/.github/workflows/REUSABLE_backend.yml index 6a200b3a45..3bd328145d 100644 --- a/.github/workflows/REUSABLE_backend.yml +++ b/.github/workflows/REUSABLE_backend.yml @@ -154,7 +154,7 @@ jobs: services: mysql: - image: ${{ contains(fromJson('["mysql", "mariadb"]'), matrix.driver) && matrix.service || '' }} + image: ${{ matrix.driver == 'mysql' && matrix.service || '' }} env: MYSQL_DATABASE: ${{ env.DB_DATABASE }} MYSQL_USER: ${{ env.DB_USERNAME }} @@ -163,6 +163,16 @@ jobs: ports: - 3306 options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=10 + mariadb: + image: ${{ matrix.driver == 'mariadb' && matrix.service || '' }} + env: + MARIADB_DATABASE: ${{ env.DB_DATABASE }} + MARIADB_USER: ${{ env.DB_USERNAME }} + MARIADB_PASSWORD: ${{ env.DB_PASSWORD }} + MARIADB_ROOT_PASSWORD: root + ports: + - 3306 + options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3 postgres: image: ${{ matrix.driver == 'pgsql' && matrix.service || '' }} env: @@ -221,7 +231,7 @@ jobs: working-directory: ${{ inputs.backend_directory }} env: DB_HOST: 127.0.0.1 - DB_PORT: ${{ (contains(fromJson('["mysql", "mariadb"]'), matrix.driver) && job.services.mysql.ports['3306']) || (matrix.driver == 'pgsql' && job.services.postgres.ports['5432']) }} + DB_PORT: ${{ (matrix.driver == 'mysql' && job.services.mysql.ports['3306']) || (matrix.driver == 'mariadb' && job.services.mariadb.ports['3306']) || (matrix.driver == 'pgsql' && job.services.postgres.ports['5432']) }} DB_PREFIX: ${{ matrix.prefix }} DB_DRIVER: ${{ matrix.driver }} COMPOSER_PROCESS_TIMEOUT: 600