Merge pull request #89 from Lustmored/symfony-7 #81
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: Test | |
on: | |
push: | |
pull_request: | |
jobs: | |
test: | |
name: 'PHP ${{ matrix.php }} + Symfony ${{ matrix.symfony }}' | |
runs-on: ubuntu-latest | |
continue-on-error: false | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- php: '7.2' | |
symfony: '2.8.*' | |
phpstan: .phpstan/symfony_4.neon | |
- php: '7.2' | |
symfony: '3.0.*' | |
phpstan: .phpstan/symfony_4.neon | |
- php: '7.2' | |
symfony: '3.1.*' | |
phpstan: .phpstan/symfony_4.neon | |
- php: '7.2' | |
symfony: '3.2.*' | |
phpstan: .phpstan/symfony_4.neon | |
- php: '7.2' | |
symfony: '3.3.*' | |
phpstan: .phpstan/symfony_4.neon | |
- php: '7.2' | |
symfony: '3.4.*' | |
phpstan: .phpstan/symfony_4.neon | |
- php: '7.2' | |
symfony: '4.0.*' | |
phpstan: .phpstan/symfony_4.neon | |
- php: '7.2' | |
symfony: '4.1.*' | |
phpstan: .phpstan/symfony_4.neon | |
- php: '7.2' | |
symfony: '4.2.*' | |
phpstan: .phpstan/default.neon | |
- php: '7.2' | |
symfony: '4.3.*' | |
phpstan: .phpstan/default.neon | |
- php: '7.2' | |
symfony: '4.4.*' | |
phpstan: .phpstan/default.neon | |
- php: '7.2' | |
symfony: '5.0.*' | |
phpstan: .phpstan/symfony_5.neon | |
- php: '7.2' | |
symfony: '5.1.*' | |
phpstan: .phpstan/symfony_5.neon | |
- php: '7.2' | |
symfony: '5.2.*' | |
phpstan: .phpstan/symfony_5.neon | |
- php: '8.0' | |
symfony: '5.2.*' | |
phpstan: .phpstan/symfony_5.neon | |
- php: '8.1' | |
symfony: '6.4.*' | |
phpstan: .phpstan/symfony_6.neon | |
- php: '8.2' | |
symfony: '7.0.*' | |
phpstan: .phpstan/symfony_6.neon | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Configure coverage driver | |
id: coverage | |
run: echo ::set-output name=driver::pcov | |
- name: Install PHP with extensions | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: ${{ steps.coverage.outputs.driver }} | |
tools: composer:v2 | |
- name: Install Symfony | |
run: composer require symfony/symfony:"${{ matrix.symfony }}" --no-update | |
- name: 'Install Composer dependencies (highest)' | |
uses: 'ramsey/composer-install@v1' | |
with: | |
dependency-versions: 'highest' | |
- name: Run Tests | |
run: vendor/bin/phpunit --coverage-clover build/coverage-clover.xml | |
- name: Send coverage results to Scrutinizer CI | |
if: matrix.php != '8.0' && matrix.php != '8.1' && matrix.php != '8.2' | |
run: | | |
wget https://scrutinizer-ci.com/ocular.phar | |
php ocular.phar code-coverage:upload --format=php-clover build/coverage-clover.xml | |
- name: Send coverage results to Coveralls | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_PARALLEL: true | |
COVERALLS_FLAG_NAME: 'PHP ${{ matrix.php }} + ${{ matrix.symfony }}' | |
if: matrix.php != '8.0' && matrix.php != '8.1' && matrix.php != '8.2' | |
run: | | |
composer global require php-coveralls/php-coveralls | |
php-coveralls -x build/coverage-clover.xml -o build/coveralls-upload.json -v | |
- name: Install PHPStan | |
run: | | |
composer global require phpstan/phpstan:"1.10.*" | |
composer global require phpstan/phpstan-phpunit:"1.3.*" | |
- name: Run PHPStan | |
run: phpstan --memory-limit=1G analyse -c ${{ matrix.phpstan }} |