forked from timber/timber
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (39 loc) · 1013 Bytes
/
php-static-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
38
39
40
41
42
43
44
45
name: PHP static analysis
on:
push:
branches:
- master
- 2.x
paths:
- '**.php'
- '**composer.json'
pull_request:
branches:
- master
- 2.x
paths:
- '**.php'
- '**composer.json'
types:
- opened
- synchronize
- ready_for_review
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
php-static-analysis:
name: PHP static analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/setup
with:
PHP_TOOLS: cs2pr
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v39
- name: Run static analysis
if: steps.changed-files.outputs.all_changed_files != ''
run: ./vendor/bin/phpstan analyse --memory-limit=-1 --error-format=checkstyle ${{ join(steps.changed-files.outputs.all_changed_files, ' ') }} | cs2pr