Updating to symfony 6 and 7 #13
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: Continuous Integration | |
on: | |
pull_request: null | |
push: | |
branches: | |
- main | |
- development | |
- release/** | |
jobs: | |
tests: | |
name: Tests | |
runs-on: ubuntu-latest | |
env: | |
SYMFONY_REQUIRE: ${{ matrix.symfony-version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
php: | |
- '8.0' | |
- '8.1' | |
- '8.2' | |
symfony-version: | |
- 5.* | |
- 6.* | |
dependencies: | |
- highest | |
include: | |
- php: '8.0' | |
symfony-version: 5.* | |
dependencies: lowest | |
- php: '8.0' | |
symfony-version: 6.* | |
dependencies: lowest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: pcov | |
tools: flex | |
- name: Setup Problem Matchers for PHPUnit | |
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: Update PHPUnit | |
run: composer require --dev phpunit/phpunit ^9.3.9 --no-update | |
if: matrix.php == '8.0' && matrix.dependencies == 'lowest' | |
- name: Install dependencies | |
uses: ramsey/composer-install@v1 | |
with: | |
dependency-versions: ${{ matrix.dependencies }} | |
composer-options: --prefer-dist | |
- name: Run tests | |
run: vendor/bin/phpunit --coverage-clover=build/coverage-report.xml | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: build/coverage-report.xml | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
missing-optional-packages-tests: | |
name: Tests without optional packages | |
runs-on: ubuntu-latest | |
env: | |
SYMFONY_REQUIRE: ${{ matrix.symfony-version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- php: '8.0' | |
dependencies: lowest | |
symfony-version: 5.4.* | |
- php: '8.1' | |
dependencies: highest | |
- php: '8.2' | |
dependencies: highest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: pcov | |
tools: flex | |
- name: Setup Problem Matchers for PHPUnit | |
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: Remove optional packages | |
run: composer remove doctrine/dbal doctrine/doctrine-bundle symfony/messenger symfony/twig-bundle symfony/cache symfony/http-client --dev --no-update | |
- name: Install dependencies | |
uses: ramsey/composer-install@v1 | |
with: | |
dependency-versions: ${{ matrix.dependencies }} | |
composer-options: --prefer-dist | |
- name: Run tests | |
run: vendor/bin/phpunit --coverage-clover=build/coverage-report.xml | |
- name: Upload code coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
file: build/coverage-report.xml | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |