Skip to content

Commit

Permalink
Enhancement: Run static analysis using different versions of phpstan/…
Browse files Browse the repository at this point in the history
…phpstan
  • Loading branch information
localheinz committed Dec 13, 2019
1 parent 88bc17d commit 28a528e
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ jobs:
php-version:
- 7.4

phpstan-version:
- "^0.10.0"
- "^0.11.0"
- "^0.12.0"

dependencies:
- lowest
- highest

steps:
- name: "Checkout"
uses: actions/[email protected]
Expand All @@ -73,12 +82,20 @@ jobs:
uses: actions/[email protected]
with:
path: ~/.composer/cache
key: php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('**/composer.lock') }}
key: php-${{ matrix.php-version }}-phpstan-${{ matrix.phpstan-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
php-${{ matrix.php-version }}-composer-locked-
php-${{ matrix.php-version }}-phpstan-${{ matrix.phpstan-version }}-composer-${{ matrix.dependencies }}-
- name: "Install locked dependencies with composer"
run: composer install --no-interaction --no-progress --no-suggest
- name: "Require phpstan/phpstan:${{ matrix.phpstan-version }} with lowest dependencies"
if: matrix.dependencies == 'lowest'
run: composer require phpstan/phpstan:${{ matrix.phpstan-version }} --no-interaction --no-progress --no-suggest --prefer-lowest --update-with-dependencies

- name: "Require phpstan/phpstan:${{ matrix.phpstan-version }} with highest dependencies"
if: matrix.dependencies == 'highest'
run: composer require phpstan/phpstan:${{ matrix.phpstan-version }} --no-interaction --no-progress --no-suggest --update-with-dependencies

- name: "Run composer show phpstan/phpstan"
run: composer show phpstan/phpstan

- name: "Run phpstan/phpstan"
run: vendor/bin/phpstan analyse --configuration=phpstan.neon
Expand All @@ -91,15 +108,10 @@ jobs:
strategy:
matrix:
php-version:
- 7.1
- 7.2
- 7.3
- 7.4

dependencies:
- lowest
- locked
- highest

steps:
- name: "Checkout"
Expand Down

0 comments on commit 28a528e

Please sign in to comment.