Skip to content

Commit

Permalink
Simplify PHPCS action in workflow file
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
attackant committed Oct 30, 2023
1 parent 55477bb commit a037276
Showing 1 changed file with 12 additions and 20 deletions.
32 changes: 12 additions & 20 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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: ./

0 comments on commit a037276

Please sign in to comment.