Skip to content

Commit 6cb5b2a

Browse files
committed
Add PHPStan and coding standards to CI
- Add PHPStan static analysis job - Add PHPCS coding standards job - Both jobs allow failure with || true for now
1 parent e8c733a commit 6cb5b2a

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ on:
88

99
jobs:
1010
syntax-check:
11-
name: PHP Syntax Check
11+
name: PHP ${{ matrix.php-version }} Syntax
1212
runs-on: ubuntu-latest
1313
strategy:
14+
fail-fast: false
1415
matrix:
1516
php-version: ['8.2', '8.3', '8.4']
1617

@@ -27,7 +28,29 @@ jobs:
2728
run: composer install --prefer-dist --no-progress
2829

2930
- name: Check PHP syntax
30-
run: find src -name "*.php" -exec php -l {} \;
31+
run: |
32+
find src -name "*.php" -exec php -l {} \;
33+
php -l wp-djot.php
34+
php -l uninstall.php
35+
36+
static-analysis:
37+
name: PHPStan
38+
runs-on: ubuntu-latest
39+
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: Setup PHP
44+
uses: shivammathur/setup-php@v2
45+
with:
46+
php-version: '8.2'
47+
tools: composer:v2, phpstan
48+
49+
- name: Install dependencies
50+
run: composer install --prefer-dist --no-progress
51+
52+
- name: Run PHPStan
53+
run: phpstan analyse --configuration=phpstan.neon || true
3154

3255
coding-standards:
3356
name: Coding Standards

0 commit comments

Comments
 (0)