-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (29 loc) · 1.26 KB
/
analysis.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
# .github/workflows/analysis.yml
name: "Static analysis"
on: [ push ]
jobs:
build:
name: "PHPStan"
runs-on: ubuntu-22.04
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: "Build environment"
uses: shivammathur/setup-php@v2
with:
php-version: "7.1"
coverage: "xdebug"
- name: "Dependencies"
run: |
php --version
composer --version
COMPOSER_MEMORY_LIMIT=-1 composer update
- name: "Application"
run: |
mkdir -p build/logs
wget -c -nc --retry-connrefused --tries=0 https://github.com/phpstan/phpstan/releases/download/1.4.10/phpstan.phar -O phpstan.phar
chmod +x phpstan.phar
php phpstan.phar --version
echo -e "parameters:\n level: 0\n excludePaths:\n - \"Resources/*\"\n - \"Tests/*\"\n - \"vendor/*\"" > phpstan.neon
- name: "Analyses"
run: php phpstan.phar analyse . --error-format=github --configuration phpstan.neon