Skip to content

Add Doctrine ORM 3 support #56

Add Doctrine ORM 3 support

Add Doctrine ORM 3 support #56

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
phpunit-sqlite:
name: PHPUnit (PHP ${{ matrix.php }} - Symfony ${{ matrix.symfony }} - Doctrine ${{ matrix.doctrine }} - SQLite - ${{ matrix.operating-system }})
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest, windows-latest ]
php: ['8.1', '8.2', '8.3', '8.4']
symfony: ['5.4.*', '6.4.*', '7.2.*']
doctrine: ['^2.5', '^3.0']
exclude:
- { php: '8.1', symfony: '7.2.*' }
- { php: '8.1', doctrine: '^3.0' }
- { symfony: '5.4.*', doctrine: '^3.0' }
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: flex
coverage: none
- uses: ramsey/composer-install@v3
env:
SYMFONY_REQUIRE: ${{ matrix.symfony }}
with:
composer-options: --with=doctrine/orm:${{ matrix.doctrine }}
- run: vendor/bin/phpunit tests
env:
DATABASE_URL: 'sqlite:///:memory:'
phpunit-mysql:
name: PHPUnit (PHP ${{ matrix.php }} - Symfony ${{ matrix.symfony }} - Doctrine ${{ matrix.doctrine }} - MySQL)
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: test_db
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2', '8.3', '8.4']
symfony: ['5.4.*', '6.4.*', '7.2.*']
doctrine: ['^2.5', '^3.0']
exclude:
- { php: '8.1', symfony: '7.2.*' }
- { php: '8.1', doctrine: '^3.0' }
- { symfony: '5.4.*', doctrine: '^3.0' }
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: flex
extensions: pdo_mysql
coverage: none
- uses: ramsey/composer-install@v3
env:
SYMFONY_REQUIRE: ${{ matrix.symfony }}
with:
composer-options: --with=doctrine/orm:${{ matrix.doctrine }}
- run: vendor/bin/phpunit tests
env:
DATABASE_URL: 'mysql://root:@127.0.0.1:3306/test_db'
phpunit-postgres:
name: PHPUnit (PHP ${{ matrix.php }} - Symfony ${{ matrix.symfony }} - Doctrine ${{ matrix.doctrine }} - PostgreSQL)
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test_db
options: >-
--health-cmd pg_isready
--health-interval=10s
--health-timeout=5s
--health-retries=3
strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2', '8.3', '8.4']
symfony: ['5.4.*', '6.4.*', '7.2.*']
doctrine: ['^2.5', '^3.0']
exclude:
- { php: '8.1', symfony: '7.2.*' }
- { php: '8.1', doctrine: '^3.0' }
- { symfony: '5.4.*', doctrine: '^3.0' }
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: flex
extensions: pdo_pgsql
coverage: none
- uses: ramsey/composer-install@v3
env:
SYMFONY_REQUIRE: ${{ matrix.symfony }}
with:
composer-options: --with=doctrine/orm:${{ matrix.doctrine }}
- run: vendor/bin/phpunit tests
env:
DATABASE_URL: 'postgresql://postgres:[email protected]:5432/test_db'
ecs:
name: Easy Coding Standard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: latest
coverage: none
- uses: ramsey/composer-install@v3
- run: vendor/bin/ecs
phpstan:
name: PHPStan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: latest
coverage: none
- uses: ramsey/composer-install@v3
- run: vendor/bin/phpstan