Skip to content

Commit eb92347

Browse files
committed
Add github action for code style check
1 parent 7c34c0d commit eb92347

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/code-style.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Code style
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
9+
check-code-style:
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
php: ['8.2']
16+
17+
name: "Check code style | PHP ${{ matrix.php }}"
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v3
22+
23+
- name: Install PHP with latest composer
24+
uses: shivammathur/setup-php@v2
25+
with:
26+
php-version: ${{ matrix.php }}
27+
ini-values: error_reporting=-1, display_errors=On, log_errors_max_len=0
28+
coverage: none
29+
tools: none
30+
31+
# Install dependencies and handle caching in one go.
32+
# @link https://github.com/marketplace/actions/install-composer-dependencies
33+
- name: "Install Composer dependencies"
34+
uses: "ramsey/composer-install@v2"
35+
36+
- name: "Check code style"
37+
run: composer run codestyle -- --dry-run

0 commit comments

Comments
 (0)