generated from dehy/template-symfony
-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (56 loc) · 1.54 KB
/
code-quality.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: PHP Code Quality
on:
push:
branches:
- main
pull_request:
paths:
- '**.php'
jobs:
php-cs-fixer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: ctype, gd, iconv, mbstring
- name: Install
run: composer install --prefer-dist
- name: Run php-cs-fixer
run: ./vendor/bin/php-cs-fixer fix --config .php-cs-fixer.dist.php --dry-run --allow-risky=yes
env:
PHP_CS_FIXER_IGNORE_ENV: True
phpstan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: ctype, gd, iconv, mbstring
- name: Install
run: composer install --prefer-dist
- name: Run phpstan
run: ./vendor/bin/phpstan analyze
rector:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: ctype, gd, iconv, mbstring
- name: Install
run: composer install --prefer-dist
- name: Run Rector
run: ./vendor/bin/rector process --dry-run