Merge pull request #2198 from sspanel-uim/dev #1073
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint PHP Code | |
on: | |
push: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
jobs: | |
php-file-changed: | |
runs-on: ubuntu-latest | |
outputs: | |
php: ${{ steps.filter.outputs.php }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
php: | |
- '**/*.php' | |
lint: | |
needs: php-file-changed | |
if: ${{ needs.php-file-changed.outputs.php == 'true' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.2 | |
- run: | | |
composer install --no-interaction --no-progress --no-suggest | |
php vendor/bin/phpinsights analyse --no-interaction --format=github-action \ | |
--min-style=100 --min-architecture=100 --min-quality=100 |