-
-
Notifications
You must be signed in to change notification settings - Fork 24
34 lines (28 loc) · 859 Bytes
/
code-style.yml
File metadata and controls
34 lines (28 loc) · 859 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
32
33
34
name: Code Style
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
php-cs-fixer:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v5
with:
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
ref: ${{ github.event.client_payload.pull_request.head.ref }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: none # disable xdebug, pcov
tools: cs2pr
- name: Composer install
uses: ramsey/composer-install@v3
with:
composer-options: --ansi --prefer-dist
- name: Check code style
run: vendor/bin/ecs --ansi