Skip to content

Fix Code Style

Fix Code Style #61

Workflow file for this run

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.1'
symfony: '2.8.*'
phpstan: .phpstan/default.neon
- php: '7.1'
symfony: '3.0.*'
phpstan: .phpstan/default.neon
- php: '7.1'
symfony: '3.1.*'
phpstan: .phpstan/default.neon
- php: '7.1'
symfony: '3.2.*'
phpstan: .phpstan/default.neon
- php: '7.1'
symfony: '3.3.*'
phpstan: .phpstan/default.neon
- php: '7.1'
symfony: '3.4.*'
phpstan: .phpstan/default.neon
- php: '7.1'
symfony: '4.0.*'
phpstan: .phpstan/default.neon
- php: '7.1'
symfony: '4.1.*'
phpstan: .phpstan/default.neon
- php: '7.1'
symfony: '4.2.*'
phpstan: .phpstan/default.neon
- php: '7.1'
symfony: '4.3.*'
phpstan: .phpstan/default.neon
- php: '7.1'
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.0'
symfony: '6.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::$([ "${{ matrix.php }}" = "7.1" ] && echo "xdebug" || echo "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'
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'
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:"0.12.*"
composer global require phpstan/phpstan-phpunit:"0.12.*"
- name: Run PHPStan
run: phpstan --memory-limit=1G analyse -c ${{ matrix.phpstan }}