Updating Readme and Contributing files #23
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
name: WordPress Coding Standards | |
on: | |
push: | |
branches: [ develop ] | |
pull_request: | |
branches: [ develop ] | |
jobs: | |
wpcs: | |
name: WPCS Scan | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up PHP | |
uses: shivammathur/setup-php@2.26.0 | |
with: | |
php-version: '8.2.11' | |
tools: composer, cs2pr | |
- name: Set Composer allow-plugins config | |
run: composer config --global allow-plugins.dealerdirect/phpcodesniffer-composer-installer true | |
- name: Set Composer allow-plugins config | |
run: composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true | |
- name: Install dependencies | |
run: | | |
composer global require wp-coding-standards/wpcs dealerdirect/phpcodesniffer-composer-installer --dev | |
- name: Run WPCS | |
run: | | |
~/.composer/vendor/bin/phpcs --standard=WordPress src/resources/* src/src/* src/index.php src/plugin-name.php --report=checkstyle | cs2pr |