-
Notifications
You must be signed in to change notification settings - Fork 101
42 lines (33 loc) · 1.29 KB
/
php-compatibility.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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/*"