From a03727662bedece62c302c5a4a523247ed3749bd Mon Sep 17 00:00:00 2001 From: Damian Taggart <4309872+attackant@users.noreply.github.com> Date: Mon, 30 Oct 2023 15:00:25 -0600 Subject: [PATCH] Simplify PHPCS action in workflow file Refactored the PHP Coding Standards action block in Github workflow file (.github/workflows/phpcs.yml). Removed redundant steps, and migrated job definition to use the prepared PHP coding standards action. This change provides a cleaner and less error-prone setup, allowing more focus on PHP Coding Standards execution. --- .github/workflows/phpcs.yml | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) 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: ./