Skip to content

Commit ae145f1

Browse files
committed
Added phpcs to GitHub build action
1 parent a322d77 commit ae145f1

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,30 @@ jobs:
4747
- name: PHPStan
4848
run: phpstan analyse
4949

50+
phpcs:
51+
runs-on: ubuntu-latest
52+
steps:
53+
- uses: actions/checkout@v5
54+
with:
55+
persist-credentials: false
56+
- name: Set up PHP 8.2
57+
uses: shivammathur/setup-php@v2
58+
with:
59+
php-version: '8.2'
60+
tools: phpcs
61+
- name: Cache Composer packages
62+
id: composer-cache
63+
uses: actions/cache@v4
64+
with:
65+
path: vendor
66+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
67+
restore-keys: |
68+
${{ runner.os }}-php-
69+
- name: Install dependencies
70+
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
71+
- name: PHPCS
72+
run: phpcs src
73+
5074
test:
5175
runs-on: ubuntu-latest
5276
strategy:

0 commit comments

Comments
 (0)