-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Royal Simpson Pinto <[email protected]>
- Loading branch information
1 parent
fc675a3
commit 2fc751c
Showing
2 changed files
with
61 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: PHPCS Lint | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
phpcs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP Action | ||
uses: shivammathur/[email protected] | ||
with: | ||
php-version: '8.2.19' | ||
tools: composer | ||
|
||
- name: Configure Composer | ||
run: composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true | ||
|
||
- name: Install PHPCS and coding standards | ||
run: | | ||
composer global require "squizlabs/php_codesniffer=*" | ||
composer global require drupal/coder | ||
composer global require slevomat/coding-standard | ||
- name: Configure PHPCS | ||
run: ~/.composer/vendor/bin/phpcs --config-set installed_paths ~/.composer/vendor/drupal/coder/coder_sniffer,$HOME/.composer/vendor/slevomat/coding-standard | ||
|
||
- name: Run PHPCS | ||
run: ~/.composer/vendor/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme . |
This file contains 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