Skip to content

Merge pull request #69 from Strategy11/phpstorm-config #521

Merge pull request #69 from Strategy11/phpstorm-config

Merge pull request #69 from Strategy11/phpstorm-config #521

Workflow file for this run

on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- master
pull_request:
types: [ opened, labeled, synchronize ]
name: Inspections
jobs:
runPHPCSInspection:
if: contains(github.event.pull_request.labels.*.name, 'run analysis')
name: Run PHPCS inspection
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Check PHPCS
run: |
export PHPCS_DIR=/home/runner/.composer/vendor/bin
composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer global require --dev wp-coding-standards/wpcs:"^3.0"
$PHPCS_DIR/phpcs -p -s -v -n . --standard=phpcs.xml --extensions=php
- name: Check PHP syntax
run: find -L . -path ./vendor -prune -o -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l
# get the PHP version
- uses: shivammathur/setup-php@v2
with:
php-version: 5.6
- name: Check Syntax
run: find -L . -path ./vendor -prune -o -path ./tests -prune -o -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l
# get the PHP version
- uses: shivammathur/setup-php@v2
with:
php-version: 8.0
- name: Check Syntax
run: find -L . -path ./vendor -prune -o -path ./tests -prune -o -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l