Skip to content

Merge pull request #47 from sectsect/feature/code-rafactor #80

Merge pull request #47 from sectsect/feature/code-rafactor

Merge pull request #47 from sectsect/feature/code-rafactor #80

Workflow file for this run

name: PHP Coding Standards
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
run:
runs-on: ubuntu-latest
name: phpcs
env:
WP_TESTS_DIR: /tmp/wordpress-tests-lib
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
tools: composer:v2, cs2pr
- name: Check PHP Version
run: php -v
- name: Composer install
run: composer install --optimize-autoloader --prefer-dist
- name: Coding Sniffs.
run: ./vendor/bin/phpcs --report-full --report-checkstyle=/tmp/phpcs-report.xml
- name: Show PHPCS results in PR
if: ${{ always() }}
run: cs2pr /tmp/phpcs-report.xml