Drop unsupported versions of PHP and Symfony and update development dependencies #248
Workflow file for this run
This file contains hidden or 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: | |
| pull_request: | |
| push: | |
| branches: [ master, develop ] | |
| jobs: | |
| run: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # --- Symfony 6.4 LTS --- | |
| - php: '8.1' | |
| symfony-versions: '^6.4' | |
| doctrine-orm-versions: '^2.0' | |
| doctrine-mongodb-odm-bundle-versions: '^4.4' | |
| mongodb-extension-version: '1.21' | |
| coverage: 'none' | |
| - php: '8.2' | |
| symfony-versions: '^6.4' | |
| doctrine-orm-versions: '^3.0' | |
| doctrine-mongodb-odm-bundle-versions: '^5.0' | |
| mongodb-extension-version: '' | |
| coverage: 'none' | |
| - php: '8.3' | |
| symfony-versions: '^6.4' | |
| doctrine-orm-versions: '' | |
| doctrine-mongodb-odm-bundle-versions: '' | |
| mongodb-extension-version: '' | |
| coverage: 'none' | |
| - php: '8.4' | |
| symfony-versions: '^6.4' | |
| doctrine-orm-versions: '' | |
| doctrine-mongodb-odm-bundle-versions: '' | |
| mongodb-extension-version: '' | |
| coverage: 'none' | |
| - php: '8.5' | |
| symfony-versions: '^6.4' | |
| doctrine-orm-versions: '' | |
| doctrine-mongodb-odm-bundle-versions: '' | |
| mongodb-extension-version: '' | |
| coverage: 'none' | |
| # --- Symfony 7.4 LTS --- | |
| - php: '8.2' | |
| symfony-versions: '^7.4' | |
| doctrine-orm-versions: '^2.0' | |
| doctrine-mongodb-odm-bundle-versions: '^4.4' | |
| mongodb-extension-version: '1.21' | |
| coverage: 'none' | |
| - php: '8.3' | |
| symfony-versions: '^7.4' | |
| doctrine-orm-versions: '^3.0' | |
| doctrine-mongodb-odm-bundle-versions: '^5.0' | |
| mongodb-extension-version: '2.0' | |
| coverage: 'none' | |
| - php: '8.4' | |
| symfony-versions: '^7.4' | |
| doctrine-orm-versions: '' | |
| doctrine-mongodb-odm-bundle-versions: '' | |
| mongodb-extension-version: '' | |
| coverage: 'none' | |
| - description: 'Log Code Coverage' | |
| php: '8.5' | |
| coverage: 'xdebug' | |
| symfony-versions: '^7.4' | |
| doctrine-orm-versions: '' | |
| doctrine-mongodb-odm-bundle-versions: '' | |
| mongodb-extension-version: '' | |
| # --- Symfony 8.0 --- | |
| - php: '8.4' | |
| symfony-versions: '^8.0' | |
| doctrine-orm-versions: '^2.0' | |
| doctrine-mongodb-odm-bundle-versions: '' | |
| mongodb-extension-version: '' | |
| coverage: 'none' | |
| - php: '8.5' | |
| symfony-versions: '^8.0' | |
| doctrine-orm-versions: '' | |
| doctrine-mongodb-odm-bundle-versions: '^5.0' | |
| mongodb-extension-version: '' | |
| coverage: 'none' | |
| name: PHP ${{ matrix.php }} Symfony ${{ matrix.symfony-versions }} ${{ matrix.description }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set MongoDB extension | |
| id: mongodb-ext | |
| run: | | |
| if [ -n "${{ matrix.mongodb-extension-version }}" ]; then | |
| echo "extension=mongodb-${{ matrix.mongodb-extension-version }}" >> $GITHUB_OUTPUT | |
| else | |
| echo "extension=mongodb" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| coverage: ${{ matrix.coverage }} | |
| extensions: redis, relay, ${{ steps.mongodb-ext.outputs.extension }} | |
| - name: Add PHPUnit matcher | |
| run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
| - name: Update Symfony version | |
| if: matrix.symfony-versions != '' | |
| run: | | |
| composer require symfony/framework-bundle:${{ matrix.symfony-versions }} --no-update --no-scripts | |
| composer require --dev symfony/yaml:${{ matrix.symfony-versions }} --no-update --no-scripts | |
| composer require --dev symfony/browser-kit:${{ matrix.symfony-versions }} --no-update --no-scripts | |
| composer require --dev symfony/cache:${{ matrix.symfony-versions }} --no-update --no-scripts | |
| - name: Update Doctrine ORM version | |
| if: matrix.doctrine-orm-versions != '' | |
| run: | | |
| composer require --dev doctrine/orm:${{ matrix.doctrine-orm-versions }} --no-update --no-scripts | |
| - name: Update Doctrine MongoDB ODM Bundle version | |
| if: matrix.doctrine-mongodb-odm-bundle-versions != '' | |
| run: | | |
| composer require --dev doctrine/mongodb-odm-bundle:${{ matrix.doctrine-mongodb-odm-bundle-versions }} --no-update --no-scripts | |
| - name: Install dependencies | |
| run: composer install | |
| - name: Run PHPUnit tests | |
| run: vendor/bin/phpunit | |
| if: matrix.coverage == 'none' | |
| - name: PHPUnit tests and Log Code coverage | |
| run: vendor/bin/phpunit --coverage-clover=coverage.xml | |
| if: matrix.coverage == 'xdebug' | |
| - name: Run codecov | |
| uses: codecov/codecov-action@v5 | |
| if: matrix.coverage == 'xdebug' | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: './coverage.xml' | |
| fail_ci_if_error: true |