-
-
Notifications
You must be signed in to change notification settings - Fork 8
48 lines (38 loc) · 1.09 KB
/
php-quality-style.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
name: PHP Quality and Style
on:
push:
paths:
- ".github/workflows/phpstan.yml"
- "**.php"
- "phpstan.neon.dist"
- "rector.php"
jobs:
php-quality-style:
name: PHP Quality and Style
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.2"
extensions: json, dom, curl, libxml, mbstring, zip
tools: composer:v2
coverage: none
- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Run Rector
run: composer refactor
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Refactor code with Rector
- name: Run Pint
run: composer format
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Format code with Pint
- name: Run PHPStan
run: composer analyse