-
Notifications
You must be signed in to change notification settings - Fork 4
31 lines (27 loc) · 935 Bytes
/
code-style.yml
File metadata and controls
31 lines (27 loc) · 935 Bytes
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
name: Code-Style CI
on: [ push, pull_request ]
jobs:
php-cs-fixer:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ 7.4, 8.0, 8.1, 8.2 ]
steps:
- uses: actions/checkout@v3.3.0
- name: Install Infrastructure
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2, cs2pr
coverage: none
- name: Load cache
uses: actions/cache@v3
with:
path: .php_cs.cache-${{ matrix.php }}
key: php-cs-fixer-${{ matrix.php }}
restore-keys: php-cs-fixer-${{ matrix.php }}
- name: Install Dependence
uses: ramsey/composer-install@v2
with:
composer-options: --optimize-autoloader
- run: ./vendor/bin/php-cs-fixer fix --allow-risky=yes --stop-on-violation --format=checkstyle --using-cache=yes --cache-file=.php_cs.cache-${{ matrix.php }} | cs2pr