Skip to content

Refactor to use backward compatibility. #17

Refactor to use backward compatibility.

Refactor to use backward compatibility. #17

Workflow file for this run

name: Code Analysis
on: pull_request
# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
analysis:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['14.17']
php: ['7.4', '8.0']
name: PHP ${{ matrix.php }} Node ${{ matrix.node }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use desired version of NodeJS
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Cache NPM packages
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.node }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
tools: composer, cs2pr
- name: Install dependencies
run: composer install --prefer-dist --no-suggest --no-progress
- name: Run phpcs
id: phpcs
if: always()
run: ./vendor/bin/phpcs --report-full --report-checkstyle=./phpcs-report.xml
- name: Show PHPCS results in PR
if: ${{ always() && steps.phpcs.outcome == 'failure' }}
run: cs2pr ./phpcs-report.xml