Update to support doctrine dbal 3.0 & 4.0 #41
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: | |
pull_request: | |
push: | |
branches: [ main, develop ] | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php: | |
- '8.3' | |
coverage: ['none'] | |
doctrine-dbal-versions: | |
- '^3.0' | |
- '^4.0' | |
symfony-versions: | |
- '6.4.*' | |
- '7.0.*' | |
include: | |
- description: 'Log Code Coverage' | |
php: '8.3' | |
symfony-versions: '^7.0' | |
doctrine-dbal-versions: '^3.0' | |
coverage: xdebug | |
- description: 'Log Code Coverage' | |
php: '8.3' | |
symfony-versions: '^7.0' | |
doctrine-dbal-versions: '^4.0' | |
coverage: xdebug | |
name: Test with PHP ${{ matrix.php }} Symfony ${{ matrix.symfony-versions }} Doctrine DBAL ${{ matrix.doctrine-dbal-versions }} ${{ matrix.description }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: ~/.composer/cache/files | |
key: ${{ matrix.php }}-${{ matrix.symfony-versions }} | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: xdebug | |
extensions: xdebug | |
- name: Add PHPUnit matcher | |
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: Set composer cache directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache composer | |
uses: actions/[email protected] | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.symfony-versions }}-composer-${{ hashFiles('composer.json') }} | |
restore-keys: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.symfony-versions }}-composer | |
- name: Update package versions | |
if: matrix.symfony-versions != '' | |
run: | | |
composer require symfony/config:${{ matrix.symfony-versions }} --no-update --no-scripts | |
composer require symfony/dependency-injection:${{ matrix.symfony-versions }} --no-update --no-scripts | |
composer require symfony/http-kernel:${{ matrix.symfony-versions }} --no-update --no-scripts | |
composer require symfony/cache:${{ matrix.symfony-versions }} --no-update --no-scripts | |
composer require doctrine/dbal:${{ matrix.doctrine-dbal-versions }} --no-update --no-scripts -W | |
composer require --dev symfony/yaml:${{ matrix.symfony-versions }} --no-update --no-scripts | |
composer require --dev symfony/phpunit-bridge:${{ matrix.symfony-versions }} --no-update --no-scripts | |
composer require --dev symfony/framework-bundle:${{ matrix.symfony-versions }} --no-update --no-scripts | |
- name: Install dependencies | |
run: composer install | |
- name: Run PHPUnit tests | |
run: | | |
XDEBUG_MODE=off php tools/prepare-configs.php | |
XDEBUG_MODE=coverage vendor/bin/phpunit | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |