diff --git a/.github/workflows/phpcs.yml b/.github/workflows/phpcs.yml index 38a3269e..634e1e89 100644 --- a/.github/workflows/phpcs.yml +++ b/.github/workflows/phpcs.yml @@ -1,25 +1,17 @@ name: PHP Coding Standards + on: pull_request: - workflow_dispatch: + jobs: phpcs: - runs-on: ubuntu-latest - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.11.0 - with: - all_but_latest: true - - name: Checkout code - uses: actions/checkout@v3 - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.0' - coverage: none - - name: Validate Composer package - run: composer validate --strict - - name: Install dependencies - uses: ramsey/composer-install@v2 - - name: Run PHPCS - run: composer phpcs + strategy: + matrix: + php: [ 8.0 ] + wordpress: [ "latest" ] + uses: alleyinteractive/.github/.github/workflows/php-coding-standards.yml@main + with: + command: "phpcs" + php: ${{ matrix.php }} + wordpress: ${{ matrix.wordpress }} + working-directory: ./