diff --git a/.github/workflows/REUSABLE_backend.yml b/.github/workflows/REUSABLE_backend.yml index 6d92de6498..9e14e4a5fe 100644 --- a/.github/workflows/REUSABLE_backend.yml +++ b/.github/workflows/REUSABLE_backend.yml @@ -154,16 +154,7 @@ jobs: services: mysql: - image: ${{ matrix.driver == 'mysql' && matrix.service || '' }} - env: - MYSQL_DATABASE: ${{ env.DB_DATABASE }} - MYSQL_USER: ${{ env.DB_USERNAME }} - MYSQL_PASSWORD: ${{ env.DB_PASSWORD }} - MYSQL_ROOT_PASSWORD: ${{ env.DB_PASSWORD }} - ports: - - 13306:3306 - mariadb: - image: ${{ matrix.driver == 'mariadb' && matrix.service || '' }} + image: ${{ matrix.driver == 'mysql' && matrix.service || (matrix.driver == 'mariadb' && matrix.service || '') }} env: MYSQL_DATABASE: ${{ env.DB_DATABASE }} MYSQL_USER: ${{ env.DB_USERNAME }} @@ -203,18 +194,12 @@ jobs: tools: phpunit, composer:v2 ini-values: ${{ matrix.php_ini_values }} - - name: Create MySQL Database - if: ${{ matrix.driver == 'mysql' }} + - name: Create ${{ matrix.db }} Database + if: ${{ matrix.driver == 'mysql' || matrix.driver == 'mariadb' }} run: | sudo systemctl start mysql mysql -uroot -proot -e 'CREATE DATABASE flarum_test;' --port 13306 - - name: Create MariaDB Database - if: ${{ matrix.driver == 'mariadb' }} - run: | - sudo systemctl start mariadb - mariadb -uroot -proot -e 'CREATE DATABASE flarum_test;' --port 13306 - - name: Install Composer dependencies run: composer install working-directory: ${{ inputs.backend_directory }}