-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
118 lines (116 loc) · 3.72 KB
/
action.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
inputs:
php-version:
description: |
Specifies the version of php to use.
required: false
default: 8.1.14
phpstan-version:
description: |
Specifies the version of phpstan to use.
required: false
default: 1.9.13
pmmp-version:
description: |
Specifies the version of pocketmine source to analyse against.
required: false
default: latest
pmmp-source-dir:
description: |
Specifies the directory to install pocketmine sources to.
required: false
default: "./pocketmine"
analyse:
description: |
A space seperated list of paths to analyse.
required: false
default: undefined
level:
description: |
Specifies the rule level to run. https://phpstan.org/user-guide/rule-levels
Possible values: 1-9
required: false
default: 9
config:
description: |
Path to phpstan configuration file. Relative paths are resolved based on the current working directory.
required: false
default: "./pocketmine/phpstan/phpstan.neon.dist"
memory-limit:
description: |
Specifies the memory limit in the same format php.ini accepts.
required: false
default: 1G
no-progress:
description: |
Turns off the progress bar.
required: false
default: "true"
debug:
description: |
Instead of the progress bar, it outputs lines with each analysed file before its analysis.
required: false
default: ""
quiet:
description: |
Silences all the output. Useful if you’re interested only in the exit code.
required: false
default: ""
autoload-file:
description: |
If your application uses a custom autoloader, you should set it up and register in a PHP file that is
passed to this CLI option. Relative paths are resolved based on the current working directory.
required: false
default: "./pocketmine/phpstan/vendor/autoload.php"
error-format:
description: |
Specifies a custom error formatter. https://phpstan.org/user-guide/output-format
required: false
default: github
ansi:
description: |
Overrides the auto-detection of whether colors should be used in the output and how nice the progress bar should be.
required: false
default: ""
name: Run PHPStan PMMP Action
description: GitHub action for running phpstan analysis against PocketMine-MP plugin sources.
author: NxtLvLSoftware Solutions
branding:
icon: settings
color: blue
runs:
using: composite
steps:
- name: Build and prepare PHP cache
uses: pmmp/setup-php-action@6dd74c145250109942b08fc63cd5118edd2fd256
with:
php-version: ${{ inputs.php-version }}
install-path: "./bin"
- name: Install PHPStan
env:
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }}
uses: nxtlvlsoftware/setup-phpstan-action@v1.0.2
with:
version: ${{ inputs.phpstan-version }}
install-path: "./bin/phpstan"
- name: Setup PocketMine Sources
uses: nxtlvlsoftware/setup-pmmp-phpstan-env-action@v1.0.2
env:
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }}
with:
pmmp-version: ${{ inputs.pmmp-version }}
install-path: ${{ inputs.pmmp-source-dir }}
- name: Run PHPStan Analysis
uses: nxtlvlsoftware/run-phpstan-action@v1.0.2
with:
executable: "./bin/phpstan/phpstan.phar"
php: "./bin/bin/php"
analyse: ${{ inputs.analyse }}
level: ${{ inputs.level }}
config: ${{ inputs.config }}
memory-limit: ${{ inputs.memory-limit }}
no-progress: ${{ inputs.no-progress }}
debug: ${{ inputs.debug }}
quiet: ${{ inputs.quiet }}
autoload-file: ${{ inputs.autoload-file }}
error-format: ${{ inputs.error-format }}
ansi: ${{ inputs.ansi }}