Skip to content

Remove pro features #78

Remove pro features

Remove pro features #78

Workflow file for this run

name: Code Quality
# When any pr is created or updated
on:
push:
branches:
- master
- develop
- feature/*
- release/*
pull_request:
branches:
- master
- develop
- feature/*
- release/*
workflow_dispatch:
inputs:
ref:
description: 'The branch to run the code quality checks on'
required: false
default: 'master'
jobs:
php_sniff:
name: PHP Code Sniffer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup proper PHP version
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none
tools: composer, cs2pr
- name: Install Composer dependencies
run: composer install --no-interaction --no-progress --no-suggest --optimize-autoloader
- id: changes
run: |
URL="https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files"
FILES=$(curl -s -X GET -G $URL | jq -r '.[] | .filename' | xargs)
echo "{files}={$FILES}" >> $GITHUB_OUTPUT
- name: Detect coding standard violations
run: vendor/bin/phpcs ${{ steps.changes.outputs.files }} -q --report=checkstyle | cs2pr --graceful-warnings
php_syntax:
name: PHP Syntax Check
runs-on: ubuntu-latest
strategy:
matrix:
php: [ 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2 ]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.ref }}
- name: Setup proper PHP version
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Check all files for syntax errors
run: find -L $GITHUB_WORKSPACE ! -path '*/tests/*' ! -path '*/vendor/*' ! -path '*/node_modules/*' -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l