Bump wp-coding-standards/wpcs from 2.3.0 to 3.0.1 #220
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: Code Style Check | |
on: | |
push: | |
workflow_dispatch: | |
concurrency: | |
group: csc-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
codestyle: | |
name: Run code style check | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
steps: | |
- name: Check out source code | |
uses: actions/[email protected] | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache Composer packages | |
uses: actions/[email protected] | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-php-7.4-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-php-7.4 | |
- name: Validate composer.json and composer.lock | |
run: composer validate | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-progress --no-interaction --ignore-platform-reqs | |
- name: Add error matcher | |
run: echo "::add-matcher::$(pwd)/.github/checkstyle-problem-matcher.json" | |
- name: Run style check | |
run: vendor/bin/phpcs --report=checkstyle |