-
Notifications
You must be signed in to change notification settings - Fork 7
37 lines (28 loc) · 863 Bytes
/
lint.yml
File metadata and controls
37 lines (28 loc) · 863 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
35
36
37
name: CS - File lint and file validation
on:
push:
pull_request:
paths:
- '**workflows/lint.yml'
- '**.php'
- '**phpcs.xml.dist'
- '**composer.json'
jobs:
lint:
name: ✔ CS check al files
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '--skip ci') && !github.event.pull_request.draft"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Validate php files
run: find ./src/ ./tests/ -type f -name '*.php' -print0 | xargs -0 -L 1 -P 4 -- php -l
- uses: ramsey/composer-install@v2
- name: Coding standard
run: composer run cs