Skip to content

Commit

Permalink
Add build for postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMilek committed Nov 20, 2024
1 parent 8605144 commit 598683e
Showing 1 changed file with 50 additions and 7 deletions.
57 changes: 50 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
tests:
runs-on: ubuntu-latest

name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}, wkhtmltopdf: ${{ matrix.wkhtmltopdf }}, State Machine Adapter ${{ matrix.state_machine_adapter }}"
name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, ${{ matrix.database == 'mysql' && format('MySQL {0}', matrix.mysql) || matrix.database == 'postgres' && format('Postgres {0}', matrix.postgres) }}, wkhtmltopdf: ${{ matrix.wkhtmltopdf }}, State Machine Adapter ${{ matrix.state_machine_adapter }}"

strategy:
fail-fast: false
Expand All @@ -24,6 +24,8 @@ jobs:
sylius: ["~1.13.0", "~1.14.0"]
mysql: ["8.4"]
node: ["20.x"]
postgres: ["15.8"]
database: ["mysql", "postgres"]
wkhtmltopdf: ["0.12.6-1"]
state_machine_adapter: ["symfony_workflow"]

Expand All @@ -32,14 +34,25 @@ jobs:
php: "8.1"
symfony: "^6.4"
sylius: "~1.14.0"
database: "mysql"
mysql: "8.4"
node: "20.x"
wkhtmltopdf: "0.12.6-1"
state_machine_adapter: "symfony_workflow"
-
php: "8.1"
symfony: "^6.4"
sylius: "~1.14.0"
database: "postgres"
mysql: "15.8"
node: "20.x"
wkhtmltopdf: "0.12.6-1"
state_machine_adapter: "symfony_workflow"
-
php: "8.2"
symfony: "^6.4"
sylius: "~1.14.0"
database: "mysql"
mysql: "8.4"
node: "20.x"
wkhtmltopdf: "0.12.6-1"
Expand All @@ -48,14 +61,33 @@ jobs:
php: "8.2"
symfony: "^6.4"
sylius: "~1.14.0"
mysql: "8.4"
database: "postgres"
mysql: "15.8"
node: "20.x"
wkhtmltopdf: "0.12.6-1"
state_machine_adapter: "winzou_state_machine"
-
php: "8.2"
symfony: "^6.4"
sylius: "~1.14.0"
database: "mysql"
postgres: "8.4"
node: "20.x"
wkhtmltopdf: false
state_machine_adapter: "symfony_workflow"
-
php: "8.2"
symfony: "^6.4"
sylius: "~1.14.0"
database: "postgres"
mysql: "15.8"
node: "20.x"
wkhtmltopdf: false
state_machine_adapter: "symfony_workflow"

env:
APP_ENV: test
DATABASE_URL: "mysql://root:[email protected]/sylius?serverVersion=${{ matrix.mysql }}"
DATABASE_URL: ${{ matrix.database == 'mysql' && format('mysql://root:[email protected]/sylius?serverVersion={0}', matrix.mysql) || format('pgsql://postgres:[email protected]/sylius?serverVersion={0}', matrix.postgres) }}
TEST_SYLIUS_STATE_MACHINE_ADAPTER: "${{ matrix.state_machine_adapter }}"

steps:
Expand All @@ -78,15 +110,26 @@ jobs:
node-version: "${{ matrix.node }}"

-
name: Shutdown default MySQL
run: sudo service mysql stop
name: Shutdown default database services
run: |
sudo service mysql stop || true
sudo service postgresql stop || true
-
name: Setup MySQL
if: matrix.database == 'mysql'
uses: mirromutth/[email protected]
with:
mysql version: "${{ matrix.mysql }}"
mysql root password: "root"
mysql version: "${{ matrix.mysql }}"
mysql root password: "root"

-
name: Setup PostgreSQL
if: matrix.database == 'postgres'
uses: harmon758/postgresql-action@v1
with:
postgresql version: "${{ matrix.postgres }}"
postgresql password: "postgres"

-
name: Setup cache for wkhtmltopdf
Expand Down

0 comments on commit 598683e

Please sign in to comment.