mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-02-20 01:21:20 +01:00
Add Static Analysis to CI (#9262)
This commit is contained in:
32
.github/workflows/ci.yml
vendored
32
.github/workflows/ci.yml
vendored
@@ -39,3 +39,35 @@ jobs:
|
||||
|
||||
- name: Check composer.json format
|
||||
run: composer validate --strict --no-check-lock && composer normalize --dry-run --no-check-lock
|
||||
|
||||
phpstan:
|
||||
runs-on: ubuntu-latest
|
||||
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
|
||||
|
||||
name: Static Analysis
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: "8.3"
|
||||
extensions: mbstring
|
||||
tools: composer:v2
|
||||
coverage: none
|
||||
ini-values: error_reporting=E_ALL
|
||||
|
||||
- name: Setup composer
|
||||
run: |
|
||||
cp composer.json-dist composer.json
|
||||
composer require "kolab/net_ldap3:~1.1.1" --no-update
|
||||
composer require "laravel/dusk:^7.9" --no-update
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer install --prefer-dist --no-interaction --no-progress
|
||||
|
||||
- name: Run Static Analysis
|
||||
run: |
|
||||
vendor/bin/phpstan analyse
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
"require-dev": {
|
||||
"ergebnis/composer-normalize": "^2.13",
|
||||
"friendsofphp/php-cs-fixer": "^3.0",
|
||||
"phpstan/extension-installer": "^1.1",
|
||||
"phpstan/phpstan": "^1.2",
|
||||
"phpstan/phpstan-deprecation-rules": "^1.0",
|
||||
"phpunit/phpunit": "^9.6"
|
||||
},
|
||||
"suggest": {
|
||||
@@ -34,6 +37,7 @@
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
"ergebnis/composer-normalize": true,
|
||||
"phpstan/extension-installer": true,
|
||||
"roundcube/plugin-installer": true
|
||||
}
|
||||
}
|
||||
|
||||
3279
phpstan-baseline.neon
Normal file
3279
phpstan-baseline.neon
Normal file
File diff suppressed because it is too large
Load Diff
9
phpstan.neon.dist
Normal file
9
phpstan.neon.dist
Normal file
@@ -0,0 +1,9 @@
|
||||
includes:
|
||||
- phpstan-baseline.neon
|
||||
|
||||
parameters:
|
||||
level: 2
|
||||
paths:
|
||||
- .
|
||||
excludePaths:
|
||||
- vendor
|
||||
Reference in New Issue
Block a user