Skip to content

Commit

Permalink
run PHPStan with different Symfony versions
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-gribanov committed Jan 12, 2021
1 parent dccb327 commit 09a9b33
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 6 deletions.
64 changes: 59 additions & 5 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,86 @@ on:

jobs:
phpstan:
name: PHPStan
name: 'PHPStan PHP ${{ matrix.php-version }} + ${{ matrix.variant }}'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php-version: '7.1'
variant: 'symfony/symfony:"2.8.*"'
config: symfony_2.neon
- php-version: '7.1'
variant: 'symfony/symfony:"3.0.*"'
config: symfony_3.neon
- php-version: '7.1'
variant: 'symfony/symfony:"3.1.*"'
config: symfony_3.neon
- php-version: '7.1'
variant: 'symfony/symfony:"3.2.*"'
config: symfony_3.neon
- php-version: '7.1'
variant: 'symfony/symfony:"3.3.*"'
config: symfony_3.neon
- php-version: '7.1'
variant: 'symfony/symfony:"3.4.*"'
config: symfony_3.neon
- php-version: '7.1'
variant: 'symfony/symfony:"4.0.*"'
config: symfony_4.1.neon
- php-version: '7.1'
variant: 'symfony/symfony:"4.1.*"'
config: symfony_4.1.neon
- php-version: '7.1'
variant: 'symfony/symfony:"4.2.*"'
config: symfony_4.neon
- php-version: '7.1'
variant: 'symfony/symfony:"4.3.*"'
config: symfony_4.neon
- php-version: '7.1'
variant: 'symfony/symfony:"4.4.*"'
config: symfony_4.neon
- php-version: '7.2'
variant: 'symfony/symfony:"5.0.*"'
config: symfony_5.neon
- php-version: '7.2'
variant: 'symfony/symfony:"5.1.*"'
config: symfony_5.neon
- php-version: '7.2'
variant: 'symfony/symfony:"5.2.*"'
config: symfony_5.neon
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: 7.1
php-version: ${{ matrix.php-version }}
coverage: none
tools: composer:v2

- name: Install variant
if: matrix.variant != 'normal'
run: composer require ${{ matrix.variant }} --no-update

- name: Install PHPStan
run: |
composer require phpstan/phpstan:"0.12.*" --no-update
composer require phpstan/phpstan-phpunit:"0.12.*" --no-update
- name: Install Composer dependencies (highest)
- name: Install variant
if: matrix.variant != 'normal'
run: composer require ${{ matrix.variant }} --no-update

- name: 'Install Composer dependencies (${{ matrix.dependencies }})'
uses: 'ramsey/composer-install@v1'
with:
dependency-versions: 'highest'
dependency-versions: '${{ matrix.dependencies }}'
composer-options: '--prefer-dist --prefer-stable'

- name: Run PHPStan
run: vendor/bin/phpstan --memory-limit=1G analyse
run: vendor/bin/phpstan --memory-limit=1G analyse -c ${{ matrix.config }}

php-cs-fixer:
name: PHP CS Fixer
Expand Down
2 changes: 1 addition & 1 deletion .phpstan/symfony_5.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# config for Symfone 5.0 - 5.1
# config for Symfone 5.0 - 5.2

includes:
- default.neon
Expand Down

0 comments on commit 09a9b33

Please sign in to comment.