Update static analyzers

This commit is contained in:
Nyholm 2021-08-18 12:05:58 -07:00 committed by David Garcia
parent 6f678bf09e
commit 3c0bfca774

View File

@ -1,59 +1,66 @@
on: [ pull_request ]
name: Static analysis name: Static analysis
on:
pull_request: ~
push:
branches:
- master
jobs: jobs:
phpstan: phpstan:
name: PHPStan name: PHPStan
runs-on: Ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- name: Set up PHP
uses: shivammathur/setup-php@2.9.0
with:
php-version: '7.4'
coverage: none
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
coverage: none
tools: phpstan:0.12.92, cs2pr
- name: Download dependencies - name: Download dependencies
run: composer update --no-interaction --prefer-dist uses: ramsey/composer-install@v1
- name: PHPStan - name: PHPStan
uses: docker://oskarstark/phpstan-ga:0.12.70 run: phpstan analyze --no-progress --error-format=checkstyle | cs2pr
with:
entrypoint: /composer/vendor/bin/phpstan
args: analyze --no-progress
php-cs-fixer: php-cs-fixer:
name: PHP-CS-Fixer name: PHP-CS-Fixer
runs-on: Ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: PHP-CS-Fixer - name: Setup PHP
uses: docker://oskarstark/php-cs-fixer-ga:2.18.2 uses: shivammathur/setup-php@v2
with: with:
args: --dry-run --diff-format udiff php-version: 8.0
coverage: none
tools: php-cs-fixer:2.19.0, cs2pr
- name: PHP-CS-Fixer
run: php-cs-fixer fix --dry-run --format=checkstyle | cs2pr
psalm: psalm:
name: Psalm name: Psalm
runs-on: Ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Psalm - name: Setup PHP
uses: docker://vimeo/psalm-github-actions:4.4.1 uses: shivammathur/setup-php@v2
with: with:
args: --no-progress --show-info=false --stats php-version: 8.0
coverage: none
tools: vimeo/psalm:4.8.1
- name: Download dependencies
uses: ramsey/composer-install@v1
- name: Psalm
run: psalm --no-progress --output-format=github
roave-bc-check: roave-bc-check:
name: Roave BC Check name: Roave BC Check
@ -68,21 +75,18 @@ jobs:
composer-normalize: composer-normalize:
name: Composer Normalize name: Composer Normalize
runs-on: ubuntu-latest runs-on: ubuntu-20.04
steps: steps:
- name: Checkout code - name: Setup PHP
uses: actions/checkout@v2 uses: shivammathur/setup-php@v2
- name: Set up PHP
uses: shivammathur/setup-php@2.9.0
with: with:
php-version: 7.4 php-version: 8.0
coverage: none coverage: none
tools: composer-normalize tools: composer-normalize
- name: Validate composer.json - name: Checkout code
run: composer validate uses: actions/checkout@v2
- name: Normalize composer.json - name: Normalize
run: composer-normalize --dry-run run: composer-normalize --dry-run