Skip to content

Commit 3dc5e3a

Browse files
authored
use composer version of linter (#346)
1 parent 936afe5 commit 3dc5e3a

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

.github/workflows/lint.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,25 @@ jobs:
1010
- name: Checkout the code
1111
uses: actions/checkout@v2
1212

13-
- name: Check for code style violation with PHP-CS-Fixer
14-
uses: OskarStark/[email protected]
13+
- name: Setup PHP
14+
uses: shivammathur/setup-php@v2
15+
with:
16+
php-version: '8.2'
17+
coverage: none
18+
19+
- name: Get Composer cache directory
20+
id: cache-composer
21+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
22+
23+
- name: Restore Composer cache
24+
uses: actions/cache@v3
1525
with:
16-
args: --diff --dry-run
26+
path: ${{ steps.cache-composer.outputs.dir }}
27+
key: ${{ runner.os }}-${{ github.ref_name }}-composer-${{ hashFiles('**/composer.lock') }}
28+
29+
- name: Install Composer dependencies
30+
run: |
31+
composer install --no-interaction --prefer-dist
32+
33+
- name: Check for code style violation with PHP-CS-Fixer
34+
run: vendor/bin/php-cs-fixer fix --diff

0 commit comments

Comments
 (0)