-
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (54 loc) · 1.81 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: PHP Compatibility
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
paths:
# Any change to a PHP file should run checks.
- '**.php'
# These files configure Composer. Changes could affect the outcome.
- 'composer.*'
# This file configures PHP Compatibility. Changes could affect the outcome.
- 'phpcompat.xml.dist'
# Changes to workflow files should always verify all workflows are successful.
- '.github/workflows/*.yml'
# Allows you to run this workflow manually from the Actions tab.
workflow_dispatch:
jobs:
# Runs PHP compatibility check.
#
# Violations are reported inline with annotations.
#
# Performs the following steps:
# - Checks out the repository.
# - Sets up PHP.
# - Logs debug information about the runner container.
# - Installs Composer dependencies (use cache if possible).
# - Logs PHP_CodeSniffer debug information.
# - Runs the PHP compatibility tests.
php-compatibility:
name: Check PHP compatibility
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up PHP
uses: shivammathur/[email protected]
with:
php-version: '7.4' # Results are the same across all versions, check only in the last stable version.
coverage: none
env:
fail-fast: false
- name: Log debug information
run: |
php --version
composer --version
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Install Composer dependencies
uses: ramsey/composer-install@v3
- name: Log PHPCS debug information
run: composer phpcs-i
- name: Run PHP compatibility tests
run: composer compat:php