forked from php-actions/phpstan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
92 lines (76 loc) · 2.61 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
name: PHPStan (php-actions)
description: PHP Static Analysis in Github Actions.
inputs:
version:
description: What version of PHPStan to use
default: composer
required: false
php_version:
description: What version of PHP to use
default: latest
required: false
php_extensions:
description: Space separated list of extensions to configure with the PHP build
required: false
vendored_phpstan_path:
description: Path to a vendored phpstan binary
required: false
command:
description: The command to run (analyse [default], clear-result-cache, dump-deps, help, list, worker)
required: true
default: analyse
path:
description: Path(s) with source code to run analysis on
required: true
configuration:
description: Configuration file location
required: false
level:
description: Level of rule options - the higher, the stricter
required: false
paths_file:
description: Path to a file with a list of paths to run analysis on
required: false
autoload_file:
description: Project's additional autoload file path
required: false
error_format:
description: Format in which to print the result of the analysis
required: false
generate_baseline:
description: Path to a file where the baseline should be saved
required: false
memory_limit:
description: Memory limit for analysis
required: false
args:
description: Extra arguments to pass to the phpstan binary
required: false
runs:
using: "composite"
steps:
- env:
ACTION_TOKEN: ${{ github.token }}
ACTION_VERSION: ${{ inputs.version }}
ACTION_PHP_VERSION: ${{ inputs.php_version }}
ACTION_PHPSTAN_PATH: ${{ inputs.vendored_phpstan_path }}
ACTION_PHP_EXTENSIONS: ${{ inputs.php_extensions }}
ACTION_COMMAND: ${{ inputs.command }}
ACTION_PATH: ${{ inputs.path }}
ACTION_CONFIGURATION: ${{ inputs.configuration }}
ACTION_LEVEL: ${{ inputs.level }}
ACTION_PATHS_FILE: ${{ inputs.paths_file }}
ACTION_AUTOLOAD_FILE: ${{ inputs.autoload_file }}
ACTION_ERROR_FORMAT: ${{ inputs.error_format }}
ACTION_GENERATE_BASELINE: ${{ inputs.generate_baseline }}
ACTION_MEMORY_LIMIT: ${{ inputs.memory_limit }}
ACTION_ARGS: ${{ inputs.args }}
id: phpstan_run
run: |
set -e
bash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/59e915e4b8eeab830231a5dce6ad0998adebac05/php-build.bash) phpstan
${{ github.action_path }}/phpstan-action.bash
shell: bash
branding:
icon: 'check-square'
color: 'purple'