From 8e99359b1eb0c01dbb4aae11323ebc37ec074157 Mon Sep 17 00:00:00 2001 From: thelovekesh Date: Mon, 12 Jun 2023 13:34:30 +0530 Subject: [PATCH] Add step in PHPCS workflow to run WPCS with PHP 7.4 --- .github/workflows/phpcs_on_pull_request.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/phpcs_on_pull_request.yml b/.github/workflows/phpcs_on_pull_request.yml index ba827aa1..c9408198 100644 --- a/.github/workflows/phpcs_on_pull_request.yml +++ b/.github/workflows/phpcs_on_pull_request.yml @@ -5,11 +5,21 @@ jobs: name: Run PHPCS inspection runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} - - name: Run PHPCS inspection + + - name: Run PHPCS inspection with PHP 8.1 uses: rtCamp/action-phpcs-code-review@master env: SKIP_FOLDERS: "tests,.github" GH_BOT_TOKEN: ${{ secrets.RTBOT_TOKEN }} + + # Remove this step once WordPress Coding Standards supports PHP 8.0+. + - name: Run PHPCS inspection with PHP 7.4 + uses: rtCamp/action-phpcs-code-review@master + env: + SKIP_FOLDERS: "tests,.github" + PHPCS_PHP_VERSION: "7.4" + PHPCS_STANDARD_FILE_NAME: "phpcs.wp.xml" + GH_BOT_TOKEN: ${{ secrets.RTBOT_TOKEN }}