Add WordPress Playground PR preview #23
Workflow file for this run
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: Test Plugin | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| phpcs: | |
| name: PHP Syntax Check | |
| uses: tarosky/workflows/.github/workflows/phpcs.yml@main | |
| with: | |
| version: 7.4 | |
| phpstan: | |
| name: PHPStan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.0' | |
| tools: composer | |
| - name: Install dependencies | |
| run: composer install --no-interaction --prefer-dist | |
| - name: Run PHPStan | |
| run: composer run phpstan | |
| test: | |
| name: PHP UnitTest | |
| strategy: | |
| matrix: | |
| php: [ '7.4', '8.0' ] | |
| wp: [ 'latest', '6.6' ] | |
| uses: tarosky/workflows/.github/workflows/wp-unit-test.yml@main | |
| with: | |
| php_version: ${{ matrix.php }} | |
| wp_version: ${{ matrix.wp }} | |
| coverage: | |
| name: Code Coverage | |
| needs: [ test ] | |
| uses: tarosky/workflows/.github/workflows/wp-unit-test.yml@main | |
| with: | |
| php_version: '8.0' | |
| wp_version: latest | |
| coverage: true | |
| assets: | |
| name: Check Assets | |
| uses: tarosky/workflows/.github/workflows/npm.yml@main | |
| with: | |
| node_version: 22 | |
| package: package | |
| status-check: | |
| name: Status Check | |
| runs-on: ubuntu-latest | |
| needs: [phpcs, phpstan, test, assets] | |
| if: always() | |
| steps: | |
| - uses: re-actors/alls-green@release/v1 | |
| with: | |
| jobs: ${{ toJSON(needs) }} |