Conflict broken DBAL 4 versions #465
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
workflow_dispatch: ~ | |
push: | |
branches: | |
- 2.x | |
pull_request: ~ | |
jobs: | |
lint: | |
name: Lint | |
runs-on: 'ubuntu-latest' | |
timeout-minutes: 5 | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v3 | |
- name: 'Setup PHP' | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1' | |
coverage: none | |
- name: 'Require Doctrine MongoDB dependencies' | |
run: composer require --no-update --ignore-platform-reqs --dev --no-interaction --ansi "doctrine/mongodb-odm:^2.6" "doctrine/mongodb-odm-bundle:^5.0.0" | |
- name: 'Install dependencies' | |
id: deps | |
run: | | |
echo "::group::Install project deps" | |
composer update --prefer-dist --ignore-platform-reqs --ansi | |
echo "::endgroup::" | |
echo "::group::Install PHPUnit" | |
vendor/bin/simple-phpunit install | |
echo "::endgroup::" | |
env: | |
SYMFONY_REQUIRE: "6.4*dev" | |
- name: 'Lint - PHP CS Fixer' | |
if: always() && steps.deps.outcome == 'success' | |
run: | | |
echo "::group::Install PHP CS Fixer" | |
make php-cs-fixer.phar | |
echo "::endgroup::" | |
./php-cs-fixer.phar fix --dry-run --no-interaction --diff | |
- name: 'Lint - PHPStan' | |
if: always() && steps.deps.outcome == 'success' | |
run: ./vendor/bin/phpstan | |
test: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 | |
continue-on-error: ${{ matrix.allow-failure == 1 }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# Lowest deps | |
- name: 'Test lowest deps [Linux, PHP 8.1]' | |
os: 'ubuntu-latest' | |
php: '8.1' | |
composer-flags: '--prefer-lowest' | |
allow-unstable: true | |
mongodb: true | |
# Previous Symfony versions | |
- name: 'Test Symfony 5.4 [Linux, PHP 8.1]' | |
os: 'ubuntu-latest' | |
php: '8.1' | |
symfony: '5.4.*@dev' | |
allow-unstable: true | |
mongodb: true | |
mysql: true | |
- name: 'Test Symfony 6.4 [Linux, PHP 8.3]' | |
os: 'ubuntu-latest' | |
php: '8.3' | |
symfony: '6.4.*@dev' | |
allow-unstable: true | |
mongodb: true | |
mysql: true | |
- name: 'Test Symfony 7.0 [Linux, PHP 8.3]' | |
os: 'ubuntu-latest' | |
php: '8.3' | |
symfony: '7.0.*@dev' | |
allow-unstable: true | |
mysql: true | |
mongodb: true | |
mongodbnew: true | |
# Previous PHP versions | |
- name: 'Test Symfony 7.1 [Linux, PHP 8.2]' | |
os: 'ubuntu-latest' | |
php: '8.2' | |
symfony: '7.0.*@dev' | |
allow-unstable: true | |
mysql: true | |
mongodb: true | |
mongodbnew: true | |
# Most recent versions | |
- name: 'Test Symfony 7.1 [Linux, PHP 8.3]' | |
os: 'ubuntu-latest' | |
php: '8.3' | |
symfony: '7.0.*@dev' | |
allow-unstable: true | |
mysql: true | |
mongodb: true | |
mongodbnew: true | |
- name: 'Test Symfony 7.1 [Windows, PHP 8.3]' | |
os: 'windows-latest' | |
php: '8.3' | |
symfony: '7.1.*@dev' | |
mongodb: true | |
mongodbnew: true | |
mysql: true | |
allow-unstable: true | |
# Bleeding edge (unreleased dev versions where failures are allowed) | |
- name: 'Test next Symfony 7.2 [Linux, PHP 8.3] (allowed failure)' | |
os: 'ubuntu-latest' | |
php: '8.3' | |
symfony: '7.1.*@dev' | |
composer-flags: '--ignore-platform-req php' | |
allow-unstable: true | |
allow-failure: true | |
mysql: true | |
mongodb: true | |
mongodbnew: true | |
- name: 'Test next Symfony 7.2 [Linux, PHP 8.4] (allowed failure)' | |
os: 'ubuntu-latest' | |
php: '8.4' | |
symfony: '7.2.*@dev' | |
composer-flags: '--ignore-platform-req php' | |
allow-unstable: true | |
allow-failure: true | |
mysql: true | |
mongodb: true | |
mongodbnew: true | |
steps: | |
- name: 'Set git to use LF' | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.eol lf | |
- name: 'Checkout' | |
uses: actions/checkout@v3 | |
- name: 'Setup PHP' | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: pdo_sqlite ${{ matrix.mongodb && ', mongodb' }} ${{ matrix.mysql && ', pdo_mysql' }} | |
coverage: none | |
tools: 'composer:v2,flex' | |
- name: 'Start MongoDB (Linux)' | |
uses: supercharge/mongodb-github-action@1.10.0 | |
if: ${{ matrix.mongodb && matrix.os == 'ubuntu-latest' }} | |
- name: 'Start MongoDB (Windows)' | |
uses: crazy-max/ghaction-chocolatey@v3 | |
with: | |
args: install mongodb.install --version=7.0.4 --allow-downgrade | |
if: ${{ matrix.mongodb && matrix.os == 'windows-latest' }} | |
- name: 'Shutdown Default Ubuntu MySQL' | |
run: sudo service mysql stop | |
if: ${{ matrix.mysql && matrix.os == 'ubuntu-latest' }} | |
- name: 'Setup MySQL' | |
uses: ankane/setup-mysql@v1 | |
with: | |
mysql-version: '8.0.35' | |
database: doctrine_tests | |
if: ${{ matrix.mysql }} | |
- name: 'Get composer cache directory' | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
if: ${{ matrix.os != 'windows-latest' }} | |
- name: 'Cache dependencies' | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-${{ hashFiles('**/composer.json') }}-flags-${{ matrix.composer-flags }} | |
restore-keys: ${{ runner.os }}-composer- | |
if: ${{ matrix.os != 'windows-latest' }} | |
- name: 'Allow unstable packages' | |
run: composer config minimum-stability dev | |
if: ${{ matrix.allow-unstable }} | |
- name: 'Require Doctrine MongoDB dependencies for old symfony' | |
run: composer require --no-update ${{ matrix.composer-flags }} --dev --no-interaction --ansi "doctrine/mongodb-odm:^2.4" "doctrine/mongodb-odm-bundle:^4.5.1" | |
if: ${{ matrix.mongodb && !matrix.mongodbnew }} | |
- name: 'Require Doctrine MongoDB dependencies for new symfony' | |
run: composer require --no-update ${{ matrix.composer-flags }} --dev --no-interaction --ansi "doctrine/mongodb-odm:^2.6" "doctrine/mongodb-odm-bundle:^5.0.0" | |
if: ${{ matrix.mongodb && matrix.mongodbnew }} | |
- name: 'Install dependencies' | |
run: | | |
echo "::group::Install project deps" | |
composer update --prefer-dist ${{ matrix.composer-flags }} --ansi | |
echo "::endgroup::" | |
echo "::group::Install PHPUnit" | |
vendor/bin/simple-phpunit install | |
echo "::endgroup::" | |
env: | |
SYMFONY_REQUIRE: "${{ matrix.symfony }}" | |
- name: 'Set Doctrine MySQL DSN (Linux)' | |
run: echo "DOCTRINE_DBAL_URL=pdo-mysql://root@127.0.0.1:3306/doctrine_tests?serverVersion=8.0.35" >> $GITHUB_ENV | |
if: ${{ matrix.mysql && matrix.os == 'ubuntu-latest' }} | |
- name: 'Set Doctrine MySQL DSN (Windows)' | |
run: echo "DOCTRINE_DBAL_URL=pdo-mysql://root@127.0.0.1:3306/doctrine_tests?serverVersion=8.0.35" >> $env:GITHUB_ENV | |
if: ${{ matrix.mysql && matrix.os == 'windows-latest' }} | |
- name: 'Run PHPUnit tests' | |
run: vendor/bin/simple-phpunit --testdox --verbose |