-
Notifications
You must be signed in to change notification settings - Fork 3.4k
38 lines (37 loc) · 1.01 KB
/
lint.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
name: Lint php code
on:
push:
pull_request:
types: [opened, reopened, synchronize]
jobs:
changes:
runs-on: ubuntu-latest
outputs:
php: ${{ steps.filter.outputs.php }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
php:
- '**/*.php'
lint:
needs: changes
if: ${{ needs.changes.outputs.php == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: shivammathur/setup-php@v2
with:
php-version: 8.1
- run: |
composer config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer require nunomaduro/phpinsights --dev
php vendor/bin/phpinsights --version
php vendor/bin/phpinsights analyse --no-interaction --format=github-action \
--min-style=100 --min-architecture=100 --min-quality=100