forked from FriendsOfSymfony1/symfony1
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (27 loc) · 859 Bytes
/
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
name: "Code Linting"
on:
push:
branches:
- master
pull_request:
jobs:
php-cs-fixer:
name: 'PHP-CS-Fixer'
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: php-cs-fixer:3.45, cs2pr
- uses: actions/cache@v3
with:
path: '.php-cs-fixer.cache'
key: ${{ github.repository }}-8.2-phpcsfixer-${{ github.ref_name }}
restore-keys: |
${{ github.repository }}-8.2-phpcsfixer-master
${{ github.repository }}-8.2-phpcsfixer-
- name: Run PHP-CS-Fixer
# Using cs2pr settings, see: https://github.com/shivammathur/setup-php#tools-with-checkstyle-support
run: 'php-cs-fixer fix --dry-run --format checkstyle | cs2pr'