Skip to content

Commit

Permalink
Phpstan: Separate workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder33445 committed Apr 15, 2024
1 parent 622c64d commit fac01a0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
os: ['ubuntu-latest']

steps:
- name: Checkout code base
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -31,11 +31,7 @@ jobs:
tools: phpcs

- name: Setup dependencies
run: |
composer require -n --no-progress overtrue/phplint
git clone --depth 1 https://github.com/Icinga/icingaweb2.git vendor/icingaweb2
git clone --depth 1 -b snapshot/nightly https://github.com/Icinga/icinga-php-library.git vendor/icinga-php-library
git clone --depth 1 -b snapshot/nightly https://github.com/Icinga/icinga-php-thirdparty.git vendor/icinga-php-thirdparty
run: composer require -n --no-progress overtrue/phplint

- name: PHP Lint
if: ${{ ! cancelled() }}
Expand All @@ -44,7 +40,3 @@ jobs:
- name: PHP CodeSniffer
if: ${{ ! cancelled() }}
run: phpcs

- name: PHPStan
if: ${{ ! cancelled() }}
uses: php-actions/phpstan@v3
15 changes: 15 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: PHPStan

on:
pull_request:
branches:
- master

jobs:
phpstan:
uses: icinga/github-actions/.github/workflows/phpstan.yml@main
with:
dependencies: |
{
"/icingaweb2" : "https://github.com/Icinga/icingaweb2.git"
}
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ parameters:
reportUnmatched: false

scanDirectories:
- vendor
- /icingaweb2

universalObjectCratesClasses:
- Icinga\Web\View

0 comments on commit fac01a0

Please sign in to comment.