forked from yiisoft/yii2
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (66 loc) · 2.21 KB
/
static.yml
File metadata and controls
79 lines (66 loc) · 2.21 KB
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
---
name: static analysis
permissions:
contents: read
pull-requests: write
on:
pull_request: &ignore-paths
paths-ignore:
- ".appveyor.yml"
- ".dockerignore"
- ".editorconfig"
- ".git-blame-ignore-revs"
- ".gitattributes"
- ".github/CONTRIBUTING.md"
- ".github/FUNDING.yml"
- ".github/ISSUE_TEMPLATE.md"
- ".github/PULL_REQUEST_TEMPLATE.md"
- ".github/SECURITY.md"
- ".gitignore"
- ".gitlab-ci.yml"
- "code-of-conduct.md"
- "docs/**"
- "framework/.gitignore"
- "framework/.phpstorm.meta.php"
- "framework/CHANGELOG.md"
- "framework/LICENSE.md"
- "framework/README.md"
- "framework/UPGRADE.md"
- "eslint.config.js"
- "LICENSE.md"
- "README.md"
- "ROADMAP.md"
push: *ignore-paths
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
phpstan:
name: PHP ${{ matrix.php }}-PHPStan
env:
PHP_EXTENSIONS: ${{ matrix.php < 8.0 && 'apc' || 'apcu' }}, curl, dom, imagick, intl, mbstring, mcrypt, memcached
PHP_INI_VALUES: apc.enabled=1,apc.shm_size=32M,apc.enable_cli=1, date.timezone='UTC'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5]
steps:
- name: Monitor action permissions.
if: runner.os != 'Windows'
uses: GitHubSecurityLab/actions-permissions/monitor@v1
- name: Checkout.
uses: actions/checkout@v5
- name: Setup PHP with Composer.
uses: ./.github/actions/php-setup
with:
extensions: ${{ matrix.php < 8.0 && 'apc' || 'apcu' }}, ${{ env.PHP_EXTENSIONS }}
ini-values: ${{ env.PHP_INI_VALUES }}, session.save_path="${{ runner.temp }}"
php-version: ${{ matrix.php }}
tools: cs2pr, pie
- name: Static analysis PHP 7.x.
if: matrix.php == '7.3' || matrix.php == '7.4'
run: vendor/bin/phpstan analyse --configuration=phpstan-7x.dist.neon --error-format=checkstyle | cs2pr
- name: Static analysis PHP 8.x.
if: matrix.php != '7.3' && matrix.php != '7.4'
run: vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr