-
-
Notifications
You must be signed in to change notification settings - Fork 116
34 lines (26 loc) · 914 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
32
33
34
name: PHP Lint
on: [ push, pull_request ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none
- name: Get Composer cache directory
id: cache-composer
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Restore Composer cache
uses: actions/cache@v3
with:
path: ${{ steps.cache-composer.outputs.dir }}
key: ${{ runner.os }}-${{ github.ref_name }}-composer-${{ hashFiles('**/composer.lock') }}
- name: Install Composer dependencies
run: |
composer install --no-interaction --prefer-dist
- name: Check for code style violation with PHP-CS-Fixer
run: vendor/bin/php-cs-fixer fix --diff