Skip to content

Commit

Permalink
Add Static Analysis to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Dec 16, 2023
1 parent f5d7673 commit afbe5cc
Show file tree
Hide file tree
Showing 4 changed files with 3,324 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions composer.json-dist
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -34,6 +37,7 @@
"config": {
"allow-plugins": {
"ergebnis/composer-normalize": true,
"phpstan/extension-installer": true,
"roundcube/plugin-installer": true
}
}
Expand Down
Loading

0 comments on commit afbe5cc

Please sign in to comment.