-
Notifications
You must be signed in to change notification settings - Fork 1k
63 lines (58 loc) · 1.58 KB
/
lint.yml
File metadata and controls
63 lines (58 loc) · 1.58 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
name: Lint
on:
push:
branches: [ main ]
pull_request:
jobs:
php_cs_fixer:
name: PHP CS Fixer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Run Script
run: testing/run_cs_check.sh
php_code_sniffer:
name: PHP Code Sniffer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- name: Install Dependencies
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
command: composer global require squizlabs/php_codesniffer
- name: Run PHPCS Code Style Checker
run: ~/.composer/vendor/bin/phpcs --standard=phpcs-ruleset.xml -p -s
phpstan_static_analysis:
name: PHPStan Static Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Get changed files
id: changedFiles
uses: tj-actions/changed-files@v44
- uses: jwalton/gh-find-current-pr@v1
id: findPr
with:
state: open
- name: Run Script
run: |
composer install -d testing/
git fetch --no-tags --prune --depth=5 origin main
bash testing/run_staticanalysis_check.sh
env:
FILES_CHANGED: ${{ steps.changedFiles.outputs.all_changed_files }}
PULL_REQUEST_NUMBER: ${{ steps.findPr.outputs.pr }}