rector/.github/workflows/code_analysis.yaml
Abdul Malik Ikhsan 1ba58dd16e
[Dep] Update to php 8.1 requirement (manual) (#1374)
Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
2021-12-03 15:44:33 +01:00

68 lines
2.1 KiB
YAML

name: Code Analysis
on:
pull_request: null
env:
# see https://github.com/composer/composer/issues/9368#issuecomment-718112361
COMPOSER_ROOT_VERSION: "dev-main"
jobs:
code_analysis:
strategy:
fail-fast: false
matrix:
actions:
-
name: 'Composer Validate'
run: composer validate --ansi
-
name: 'Preload php-parser Order'
run: php preload.php
-
name: 'Validate Max File Length'
run: vendor/bin/easy-ci validate-file-length packages rules src tests
-
name: 'PHPStan'
run: vendor/bin/phpstan analyse --ansi --error-format symplify
-
name: 'PHPStan for config'
run: composer phpstan-config
-
name: 'Commented Code'
run: vendor/bin/easy-ci check-commented-code src packages rules tests packages-tests rules-tests --line-limit 5 --ansi
-
name: 'Active Classes'
run: vendor/bin/easy-ci check-active-class bin config src packages rules --ansi
# see https://github.com/rectorphp/rector-generator
-
name: 'Rector Generate From Recipe'
run: |
bin/rector init-recipe --ansi
bin/rector generate --ansi
name: ${{ matrix.actions.name }}
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
# see https://github.com/shivammathur/setup-php
-
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: none
- uses: "ramsey/composer-install@v1"
- run: ${{ matrix.actions.run }}