Adjust the WordPress standard referenced. #105
This file contains hidden or 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: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| phpcs: | |
| name: WPCS | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: WPCS check | |
| uses: 10up/wpcs-action@stable | |
| with: | |
| standard: 'WordPress-Extra' | |
| extra_args: '--report-json=./phpcs.json' | |
| - name: List files for debug | |
| run: ls -lah | |
| - name: Update summary | |
| if: success() && hashFiles('./phpcs.json') != '' | |
| run: | | |
| npm i -g github:10up/phpcs-json-to-md | |
| phpcs-json-to-md --path ./phpcs.json --output ./phpcs.md | |
| cat phpcs.md >> $GITHUB_STEP_SUMMARY |