Skip to content

Commit d829387

Browse files
authored
Create phpstan.yml
1 parent ac4d6ba commit d829387

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/phpstan.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: PHPStan
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
7+
- '.github/workflows/phpstan.yml'
8+
- 'phpstan.neon.dist'
9+
10+
jobs:
11+
phpstan:
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: [ubuntu-latest]
17+
php: [8.3, 8.2, 8.1]
18+
laravel: [10.*, 11.*]
19+
stability: [prefer-stable]
20+
include:
21+
- laravel: 10.*
22+
testbench: 8.*
23+
- laravel: 11.*
24+
testbench: 9.*
25+
exclude:
26+
- laravel: 11.*
27+
php: 8.1
28+
29+
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.os }}
30+
31+
steps:
32+
- name: Checkout code
33+
uses: actions/checkout@v4
34+
35+
- name: Setup PHP
36+
uses: shivammathur/setup-php@v2
37+
with:
38+
php-version: ${{ matrix.php }}
39+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
40+
coverage: none
41+
42+
- name: Install dependencies
43+
run: |
44+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
45+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
46+
- name: List Installed Dependencies
47+
run: composer show -D
48+
49+
- name: Run PHPStan
50+
run: vendor/bin/phpstan --error-format=github

0 commit comments

Comments
 (0)