forked from paysera/lib-webtopay
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (29 loc) · 810 Bytes
/
Copy pathphpstan.yml
File metadata and controls
36 lines (29 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: PHPStan
on:
pull_request:
paths:
- '**.php'
- 'phpstan.neon.dist'
permissions:
contents: read
jobs:
phpstan:
name: phpstan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP for PHPStan
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: mbstring, pdo, xml
- name: Install PHPStan dependencies
run: composer install --no-cache --no-interaction --no-progress --ignore-platform-reqs
- name: Run PHPStan
run: |
./vendor/bin/phpstan --error-format=github analyse src/
exit_code=$?
if [ $exit_code -ne 0 ]; then
echo "PHPStan analysis failed with exit code $exit_code"
exit $exit_code
fi