-
Notifications
You must be signed in to change notification settings - Fork 3
69 lines (58 loc) · 1.89 KB
/
tests.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
64
65
66
67
68
69
name: 🧪 Tests
on:
# Run on all pushes and on all pull requests.
# Prevent the build from running when there are only irrelevant changes.
push:
paths-ignore:
- '**.md'
- '**.yml'
pull_request:
# Allow manually triggering the workflow.
workflow_dispatch:
jobs:
### Runs PHPCompatibility over all PHP files.
# Local equivalent: `composer phpcs:compatibility`
phpcompatibility:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
php-versions: ['5.4', '5.6', '7.0', '7.4', '8.0']
experimental: [false]
include:
- os: ubuntu-latest
php-versions: '8.1'
experimental: true
- os: ubuntu-latest
php-versions: '5.3'
experimental: true
name: PHP Compatibility ${{ matrix.php-versions }}
continue-on-error: ${{ matrix.experimental }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 5.4
ini-values: error_reporting=E_ALL, display_errors=On
coverage: none
tools: cs2pr
# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-composer-dependencies
- name: Install Composer dependencies
uses: 'ramsey/composer-install@v1'
- name: Validate composer.json and composer.lock
run: composer validate
- name: Tool versions
run: |
which php
php --version
which composer
composer --version
which jq
jq --version
composer phpcs -- --config-show installed_paths
- name: Run PHPCS for PHPCompatibility
run: |
composer phpcs:compatibility -- --report=emacs email-to-slack.php --runtime-set testVersion ${{ matrix.php-versions }}