rector/.github/workflows/code_analysis.yaml
2021-05-06 22:30:43 +02:00

55 lines
1.6 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: '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
# 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
steps:
- uses: actions/checkout@v2
# see https://github.com/shivammathur/setup-php
-
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
coverage: none
- uses: "ramsey/composer-install@v1"
- run: ${{ matrix.actions.run }}