forked from JakubOnderka/PHP-Console-Highlighter
-
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (48 loc) · 1.74 KB
/
test.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
name: Test
on:
pull_request:
push:
# Allow manually triggering the workflow.
workflow_dispatch:
# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
experimental: [false]
include:
- php: '8.2'
experimental: true
name: "Test on PHP ${{ matrix.php }}"
continue-on-error: ${{ matrix.experimental }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: zend.assertions=1, error_reporting=-1, 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 - normal
if: ${{ matrix.experimental == false }}
uses: "ramsey/composer-install@v1"
# For the PHP "nightly", we need to install with ignore platform reqs as not all dependencies allow it.
- name: Install Composer dependencies - with ignore platform
if: ${{ matrix.experimental == true }}
uses: "ramsey/composer-install@v1"
with:
composer-options: --ignore-platform-reqs
- name: Lint
run: composer phplint -- --checkstyle | cs2pr
- name: Run unit tests
run: composer phpunit