Revisit QA pipelines #16
This file contains hidden or 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: CodeQL Analysis | |
| on: | |
| push: | |
| branches: ["master"] | |
| pull_request: | |
| branches: ["master"] | |
| schedule: | |
| - cron: '0 0 * * 0' | |
| jobs: | |
| php-lint: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php-version: ['8.2', '8.3', '8.4'] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| - name: Cache Composer | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.composer/cache | |
| key: composer-${{ hashFiles('pluginpass-pro-plugintheme-licensing/composer.lock') }} | |
| restore-keys: composer- | |
| - name: Install dependencies | |
| working-directory: pluginpass-pro-plugintheme-licensing | |
| run: composer install --no-interaction --prefer-dist | |
| - name: Run PHPCS | |
| continue-on-error: true | |
| working-directory: pluginpass-pro-plugintheme-licensing | |
| run: vendor/bin/phpcs --standard=WordPress --extensions=php --report=full --report-file=./phpcs-report.txt inc/ | |
| - name: Run PHPStan | |
| continue-on-error: true | |
| working-directory: pluginpass-pro-plugintheme-licensing | |
| run: vendor/bin/phpstan analyse --error-format=raw --no-progress inc --memory-limit=1G > ./phpstan-report.txt || true | |
| - name: Upload analysis reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: analysis-reports-${{ matrix.php-version }} | |
| path: | | |
| pluginpass-pro-plugintheme-licensing/phpcs-report.txt | |
| pluginpass-pro-plugintheme-licensing/phpstan-report.txt |