Skip to content

Commit

Permalink
Github Actions: Add Phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder33445 committed Jun 19, 2023
1 parent 8366fa6 commit dc6e36f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ jobs:

- name: Setup dependencies
run: composer require -n --no-progress overtrue/phplint
&& git clone --single-branch --branch master https://github.com/Icinga/icingaweb2.git vendor/icingaweb2
&& git clone --single-branch --branch snapshot/nightly https://github.com/Icinga/icinga-php-library.git vendor/icinga-php-library
&& git clone --single-branch --branch snapshot/nightly https://github.com/Icinga/icinga-php-thirdparty.git vendor/icinga-php-thirdparty


- name: PHP Lint
if: success() || matrix.allow_failure
Expand All @@ -41,6 +45,10 @@ jobs:
if: success() || matrix.allow_failure
run: phpcs -wps --colors

- name: PHPStan
uses: php-actions/phpstan@v3
if: success() || matrix.allow_failure

test:
name: Unit tests with php ${{ matrix.php }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand Down
9 changes: 9 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
parameters:
level: 1
paths:
- application
- library
scanDirectories:
- vendor
ignoreErrors:
- '#Unsafe usage of new static\(\)#'

0 comments on commit dc6e36f

Please sign in to comment.