diff --git a/.github/workflows/REUSABLE_backend.yml b/.github/workflows/REUSABLE_backend.yml index 3eb58d60c5..68c7f23d1b 100644 --- a/.github/workflows/REUSABLE_backend.yml +++ b/.github/workflows/REUSABLE_backend.yml @@ -170,7 +170,7 @@ jobs: POSTGRES_USER: ${{ env.DB_USERNAME }} POSTGRES_PASSWORD: ${{ env.DB_PASSWORD }} ports: - - 15432:5432 + - 5432 options: >- --health-cmd pg_isready --health-interval 10s @@ -220,7 +220,7 @@ jobs: fi working-directory: ${{ inputs.backend_directory }} env: - DB_PORT: ${{ matrix.driver == 'mysql' && 3306 || (matrix.driver == 'mariadb' && 3306 || 15432) }} + DB_PORT: ${{ contains(fromJson('["mysql", "mariadb"]'), matrix.driver) && job.services.mysql.ports['3306'] || matrix.driver == 'pgsql' && job.services.postgres.ports['5432'] }} DB_PREFIX: ${{ matrix.prefix }} DB_DRIVER: ${{ matrix.driver }} COMPOSER_PROCESS_TIMEOUT: 600 @@ -230,7 +230,7 @@ jobs: strategy: matrix: - php: ${{ fromJSON(inputs.php_versions) }} + php: ${{ fromJson(inputs.php_versions) }} services: mysql: @@ -263,7 +263,7 @@ jobs: - name: Run PHPStan run: composer analyse:phpstan env: - DB_PORT: 3306 + DB_PORT: ${{ job.services.mysql.ports['3306'] }} DB_PASSWORD: root COMPOSER_PROCESS_TIMEOUT: 600 FLARUM_TEST_TMP_DIR_LOCAL: ./tmp