Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARCH-72 #4400

Open
wants to merge 12 commits into
base: release
Choose a base branch
from
Next Next commit
Create php-compatibility.yml
KartikSuthar authored May 6, 2024
commit 10ba5f6a8db842efd58a6c1ed55dbfe87c3c9371
39 changes: 39 additions & 0 deletions .github/workflows/php-compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
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/[email protected]
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"

- name: Run PHPCompatibilityWP
run: vendor/bin/phpcs --standard=PHPCompatibilityWP --extensions=php --error-severity=1 --warning-severity=6 --runtime-set testVersion ${{ matrix.php }} .