ARCH-72 #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PHP Compatibility | |
on: pull_request | |
jobs: | |
php-compatibility: | |
name: PHP Compatibility | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
php: [ '7.4', '8.0', '8.1', '8.2' ] | |
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=4 --warning-severity=6 --runtime-set testVersion ${{ matrix.php }} . --ignore="vendor/sebastian/*" --ignore="vendor/squizlabs/*" --ignore="vendor/phpcompatibility/*" --ignore="vendor/dealerdirect/*" --ignore="vendor/symfony/*" --ignore="vendor/phpunit/*" |