-
Notifications
You must be signed in to change notification settings - Fork 44
54 lines (46 loc) · 1.65 KB
/
phpstan.yml
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: PHPStan
on: [pull_request]
jobs:
phpstan:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get changed files
id: files
uses: futuratrepadeira/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pattern: '^((?!tests)([a-zA-Z0-9\/]))+\.(php)$'
- name: List changed files
run: |
echo "Changed files are:"
echo "${{ steps.files.outputs.files_updated }}"
echo "New files are:"
echo "${{ steps.files.outputs.files_created }}"
- uses: php-actions/composer@v6
if: ${{ steps.files.outputs.files_updated != '' || steps.files.outputs.files_created != '' }}
with:
dev: yes
php_version: "8.0"
php_extensions: gd soap sockets zip
- name: Run PHPStan
id: phpstan
if: ${{ steps.files.outputs.files_updated != '' || steps.files.outputs.files_created != '' }}
uses: php-actions/phpstan@v3
with:
configuration: phpstan.neon
path: ${{ steps.files.outputs.files_updated }} ${{ steps.files.outputs.files_created }}
level: 0
php_version: 8.0
version: latest
# continue-on-error: true
# - name: Create check run
# uses: LouisBrunner/[email protected]
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# name: PHPStan analysis
# # status: completed
# conclusion: ${{ steps.phpstan.outcome }} # take status from phpstan action
# output: |
# {"summary":"${{ steps.phpstan.outputs.summary }}"}