Skip to content

ARCH-72

ARCH-72 #4

name: PHP Compatibility
on: pull_request
jobs:
php-compatibility:
name: PHP Compatibility
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [ '7.4' ]
steps:
- name: Cancel previous runs of this workflow (pull requests only)
if: ${{ github.event_name == 'pull_request' }}
uses: styfle/cancel-workflow-action@0.12.0
with:
access_token: ${{ github.token }}
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: none
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Install dependencies
uses: ramsey/composer-install@v2
with:
composer-options: "--ignore-platform-reqs --no-scripts"
- name: Run Check standards
run: vendor/bin/phpcs -i
- name: Run PHPCompatibilityWP
run: vendor/bin/phpcs --standard=PHPCompatibilityWP --extensions=php --error-severity=1 --warning-severity=6 --runtime-set testVersion ${{ matrix.php }} .