mirror of
https://github.com/predis/predis.git
synced 2026-10-08 04:46:38 +00:00
Add phpstan level 0 (#1022)
* Remove unused arguments * Fix return types * Removed unused parameter and argument * Add phpstan job * merge files * Delete phpstan-baseline.neon * Delete static-analysis.yml * merge workflows * Update composer.json * format yaml * install composer reps * fix yaml Co-authored-by: Till Krüss <tillkruss@users.noreply.github.com>
This commit is contained in:
@@ -10,7 +10,7 @@ on:
|
||||
jobs:
|
||||
|
||||
php-cs-fixer:
|
||||
name: linter
|
||||
name: PHP CS Fixer
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@@ -19,10 +19,44 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup PHP with Composer and extensions
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.1
|
||||
tools: php-cs-fixer
|
||||
uses: shivammathur/setup-php@v2
|
||||
|
||||
- name: Run php-cs-fixer
|
||||
run: php-cs-fixer fix --diff --dry-run --allow-risky=yes --using-cache=no
|
||||
|
||||
phpstan:
|
||||
name: PHPStan
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup PHP with Composer and extensions
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.2
|
||||
tools: phpstan
|
||||
|
||||
- name: Get Composer cache directory
|
||||
id: composer-cache
|
||||
run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache Composer dependencies
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.composer-cache.outputs.directory }}
|
||||
key: tests-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: tests-php-${{ matrix.php }}-composer
|
||||
|
||||
- name: Install Composer dependencies
|
||||
env:
|
||||
PHP_VERSION: ${{ matrix.php }}
|
||||
run: composer install --ansi --no-progress --prefer-dist $(if [ "$PHP_VERSION" == "8.0" ]; then echo "--ignore-platform-reqs"; fi;)
|
||||
|
||||
- name: Run PHPStan
|
||||
run: phpstan analyse
|
||||
|
||||
Reference in New Issue
Block a user