Add compatability with symfony 6.4 and prepare for 7.0 #116
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: Continuous Integration | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Validate composer.json and composer.lock | |
run: composer validate | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v2 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-php- | |
- name: Install dependencies | |
if: steps.composer-cache.outputs.cache-hit != 'true' | |
run: composer install --prefer-dist --no-progress --no-suggest | |
- name: Run php-cs-fixer | |
run: PHP_CS_FIXER_IGNORE_ENV=1 tools/php-cs-fixer fix --dry-run --diff --ansi | |
- name: Run psalm | |
run: tools/psalm | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- description: 'PHP 8.0 - SF 5.4.*' | |
php: '8.0' | |
symfony_version: '5.4.*' | |
- description: 'PHP 8.1 - SF 5.4.*' | |
php: '8.1' | |
symfony_version: '5.4.*' | |
- description: 'PHP 8.0 - SF 6.3.*' | |
php: '8.0' | |
symfony_version: '6.0.*' | |
- description: 'PHP 8.1 - SF 6.3.*' | |
php: '8.1' | |
symfony_version: '6.0.*' | |
- description: 'PHP 8.3 - SF 6.4.*' | |
php: '8.3' | |
symfony_version: '6.4.*' | |
- description: 'PHP 8.3 - SF 7.0' | |
php: '8.3' | |
symfony_version: '7.0.*' | |
name: Tests ${{ matrix.description }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: "Determine composer cache directory" | |
id: "determine-composer-cache-directory" | |
run: "echo \"::set-output name=directory::$(composer config cache-dir)\"" | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v2 | |
with: | |
path: "${{ steps.determine-composer-cache-directory.outputs.directory }}" | |
key: "v1-php-${{ matrix.php }}-sf-${{ matrix.symfony_version }}-${{ hashFiles('composer.json') }}" | |
restore-keys: "v1-php-${{ matrix.php }}-sf-${{ matrix.symfony_version }}-" | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: "pcov" | |
- run: | | |
sed -ri 's/"symfony\/(.+)": "(.+)"/"symfony\/\1": "'${{ matrix.symfony_version }}'"/' composer.json; | |
- run: composer update --no-interaction --no-progress --ansi ${{ matrix.composer_flags }} | |
- name: Run Tests | |
run: vendor/bin/phpunit --coverage-clover=coverage.xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
files: ./coverage.xml |