diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index 5eaa2a3..9f9791f 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -22,7 +22,7 @@ jobs: MARIADB_PASSWORD: password1 MARIADB_DATABASE: auto_entreprise_test ports: - - 3306/tcp + - 3306 options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 steps: @@ -53,19 +53,20 @@ jobs: working-directory: ${{ env.DIRECTORY }} run: php bin/console doc:database:create --no-interaction -e test env: - DATABASE_URL: "mysql://user1:password1@127.0.0.1:{{ job.services.mariadb.ports['3306'] }}/auto_entreprise_test?serverVersion=10.9.6-MariaDB" +# DATABASE_URL: "mysql://user1:password1@127.0.0.1:{{ job.services.mariadb.ports[3306] }}/auto_entreprise_test?serverVersion=10.9.6-MariaDB" + DATABASE_URL: ${{ format('mysql://user1:password1@127.0.0.1:{0}/auto_entreprise_test?serverVersion=10.9.6-MariaDB', job.services.mariadb.ports[3306]) }} - name: Migrate database working-directory: ${{ env.DIRECTORY }} run: php bin/console doc:mig:mig --no-interaction -e test env: - DATABASE_URL: "mysql://user1:password1@127.0.0.1:{{ job.services.mariadb.ports['3306'] }}/auto_entreprise_test?serverVersion=10.9.6-MariaDB" + DATABASE_URL: ${{ format('mysql://user1:password1@127.0.0.1:{0}/auto_entreprise_test?serverVersion=10.9.6-MariaDB', job.services.mariadb.ports[3306]) }} - name: Exec tests working-directory: ${{ env.DIRECTORY }} run: composer tuci env: - DATABASE_URL: "mysql://user1:password1@127.0.0.1:{{ job.services.mariadb.ports['3306'] }}/auto_entreprise_test?serverVersion=10.9.6-MariaDB" + DATABASE_URL: ${{ format('mysql://user1:password1@127.0.0.1:{0}/auto_entreprise_test?serverVersion=10.9.6-MariaDB', job.services.mariadb.ports[3306]) }} - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4.0.1