Skip to content

Commit

Permalink
add phpcs action
Browse files Browse the repository at this point in the history
  • Loading branch information
brookgagnon committed May 18, 2024
1 parent 3950ed7 commit 28a62ea
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: PHP CodeSniffer

on: [push, pull_request]

jobs:
php-codesniffer:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'

- name: Install dependencies
run: composer install -q

- name: Check and install PHP_CodeSniffer if needed
run: |
if [ ! -f vendor/bin/phpcs ]; then
composer require --dev squizlabs/php_codesniffer
fi
- name: Run PHP_CodeSniffer
run: vendor/bin/phpcs -q --standard=.phpcs.xml.dist

0 comments on commit 28a62ea

Please sign in to comment.