Skip to content

Commit 3a05f42

Browse files
sukhwinder33445nilmerg
authored andcommitted
Phpstan: Separate workflow
1 parent 8983aa8 commit 3a05f42

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

.github/workflows/php.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
steps:
2424
- name: Checkout code base
25-
uses: actions/checkout@v3
25+
uses: actions/checkout@v4
2626

2727
- name: Setup PHP
2828
uses: shivammathur/setup-php@v2
@@ -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() }}
@@ -65,7 +60,7 @@ jobs:
6560

6661
steps:
6762
- name: Checkout code base
68-
uses: actions/checkout@v3
63+
uses: actions/checkout@v4
6964

7065
- name: Setup PHP
7166
uses: shivammathur/setup-php@v2

.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)