-
-
Notifications
You must be signed in to change notification settings - Fork 3
81 lines (69 loc) · 2.11 KB
/
Copy pathunit-tests.yml
File metadata and controls
81 lines (69 loc) · 2.11 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
name: Unit tests
on:
push:
branches:
- develop
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php: [5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2]
fail-fast: true
steps:
- uses: actions/checkout@v2
- name: Configure PHP environment
uses: shivammathur/setup-php@v2
if: ${{ matrix.php >= '7.2' }}
with:
php-version: ${{ matrix.php }}
tools: pecl
extensions: runkit7-alpha
env:
fail-fast: true
- name: Configure PHP environment (PHP 7.1 only)
uses: shivammathur/setup-php@v2
if: ${{ matrix.php == '7.1' }}
with:
php-version: ${{ matrix.php }}
tools: pecl
extensions: runkit7-3.1.0a1
env:
fail-fast: true
# Version 2.x of runkit7 dropped PHP 7.0 support, but older releases are not available via PECL.
# https://pecl.php.net/package/runkit7
- name: Configure PHP environment (PHP 7.0 only)
uses: shivammathur/setup-php@v2
if: ${{ matrix.php == '7.0' }}
with:
php-version: ${{ matrix.php }}
tools: pecl
extensions: runkit7-1.0.11
- name: Configure PHP environment (PHP 5.x only)
uses: shivammathur/setup-php@v2
if: ${{ matrix.php <= '5.6' }}
with:
php-version: ${{ matrix.php }}
tools: pecl
extensions: runkit
env:
fail-fast: true
- name: Validate composer.json and composer.lock
run: composer validate
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-php${{ matrix.php }}-composer-
- name: Remove PHPStan
run: composer remove --dev phpstan/phpstan --no-update
- name: Install Composer dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer update --prefer-dist --no-progress --no-suggest
- name: Run test suite
run: composer test:unit