Skip to content

Commit ad28ba4

Browse files
authored
Fixed phpstan-workflow (OpenMage#2593)
* Updated workflow * Split workflow for lib/* * Changed max runs ... (test)
1 parent 9a49aa1 commit ad28ba4

File tree

1 file changed

+31
-12
lines changed

1 file changed

+31
-12
lines changed

.github/workflows/static-code-analyses.yml

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
name: PHP Syntax ${{ matrix.php-versions }}
1010
runs-on: ${{ matrix.operating-system }}
1111
strategy:
12-
max-parallel: 5
12+
max-parallel: 2
1313
matrix:
1414
operating-system: [ubuntu-latest]
1515
php-versions: ['7.3', '8.1']
@@ -34,14 +34,13 @@ jobs:
3434
name: PHP Stan ${{ matrix.directories }} - ${{ matrix.config_files }}
3535
runs-on: [ubuntu-latest]
3636
strategy:
37-
max-parallel: 2
37+
max-parallel: 1
3838
matrix:
3939
directories: [
40-
'',
41-
#'lib/',
40+
''
4241
]
4342
config_files: [
44-
'.github/phpstan.neon',
43+
'.github/phpstan.neon',
4544
]
4645
steps:
4746
- uses: actions/checkout@v3
@@ -96,13 +95,33 @@ jobs:
9695
config_files: [
9796
'.github/phpstan_experimental_level.neon',
9897
]
99-
include:
100-
- directories: [
101-
'lib/Mage',
102-
'lib/Magento',
103-
'lib/Varien'
104-
]
105-
config_files: '.github/phpstan.neon'
98+
steps:
99+
- uses: actions/checkout@v3
100+
- name: Install dependencies
101+
run: composer install --prefer-dist --no-progress --no-suggest --ignore-platform-reqs
102+
- name: ensure existance of ./app/code/local
103+
run: mkdir -p app/code/local
104+
- name: PHPStan Static Analysis
105+
continue-on-error: true
106+
run: php vendor/bin/phpstan.phar analyze --error-format=raw -c ${{ matrix.config_files }} ${{ matrix.directories }}
107+
108+
php_stan_experimental_lib:
109+
name: PHP Stan ${{ matrix.directories }} - ${{ matrix.config_files }} - experimental
110+
runs-on: [ubuntu-latest]
111+
needs: php_stan
112+
strategy:
113+
max-parallel: 6
114+
fail-fast: false
115+
matrix:
116+
directories: [
117+
'lib/Mage',
118+
'lib/Magento',
119+
'lib/Varien'
120+
]
121+
config_files: [
122+
'.github/phpstan.neon',
123+
'.github/phpstan_experimental_level.neon',
124+
]
106125
steps:
107126
- uses: actions/checkout@v3
108127
- name: Install dependencies

0 commit comments

Comments
 (0)