Skip to content

Commit 166a504

Browse files
authored
Merge pull request #236 from Icinga/separate-phpstan-workflow
Phpstan: Separate workflow
2 parents 8983aa8 + e9fc98f commit 166a504

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

.github/workflows/php.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,7 @@ jobs:
3131
tools: phpcs
3232

3333
- name: Setup dependencies
34-
run: |
35-
composer require -n --no-progress overtrue/phplint phpstan/phpstan
36-
sudo git clone --depth 1 https://github.com/Icinga/icingaweb2.git /icingaweb2
37-
sudo git clone --depth 1 https://github.com/Icinga/icingaweb2-module-director.git /usr/share/icingaweb2-modules/director
38-
sudo git clone --depth 1 -b snapshot/nightly https://github.com/Icinga/icinga-php-library.git /usr/share/icinga-php/ipl
39-
sudo git clone --depth 1 -b snapshot/nightly https://github.com/Icinga/icinga-php-thirdparty.git /usr/share/icinga-php/vendor
34+
run: composer require -n --no-progress overtrue/phplint
4035

4136
- name: PHP Lint
4237
if: ${{ ! cancelled() }}
@@ -46,10 +41,6 @@ jobs:
4641
if: ${{ ! cancelled() }}
4742
run: phpcs
4843

49-
- name: PHPStan
50-
if: ${{ ! cancelled() }}
51-
run: ./vendor/bin/phpstan analyse
52-
5344
test:
5445
name: Unit tests with PHP ${{ matrix.php }} on ${{ matrix.os }}
5546
runs-on: ${{ matrix.os }}

.github/workflows/phpstan.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: PHPStan
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
phpstan:
10+
uses: icinga/github-actions/.github/workflows/phpstan.yml@main
11+
with:
12+
dependencies: |
13+
{
14+
"/icingaweb2" : "https://github.com/Icinga/icingaweb2.git",
15+
"/usr/share/icingaweb2-modules/director" : "https://github.com/Icinga/icingaweb2-module-director.git"
16+
}

0 commit comments

Comments
 (0)