-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (64 loc) · 2.03 KB
/
workflow.yml
File metadata and controls
70 lines (64 loc) · 2.03 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
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system:
- windows-2019
- windows-2016
- ubuntu-22.04
- ubuntu-10.04
- macos-11.0
php:
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
- 8.0
- 8.1
- 8.2
exclude:
- operating-system: windows-2019
php: 5.6
- operating-system: windows-2016
php: 5.6
steps:
- uses: actions/checkout@master
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
# Dependency patches for PHP5.6.
- run: rm composer.lock
if: ${{ matrix.php == '5.6' }}
- run: composer remove --dev vimeo/psalm phpunit/phpunit
if: ${{ matrix.php == '5.6' }}
- run: composer require --dev phpunit/phpunit:^5.0.0
if: ${{ matrix.php == '5.6' }}
# Dependency patches for PHP7.0.
- run: rm composer.lock
if: ${{ matrix.php == '7.0' }}
- run: composer remove --dev vimeo/psalm phpunit/phpunit
if: ${{ matrix.php == '7.0' }}
- run: composer require --dev phpunit/phpunit:^6.5.0
if: ${{ matrix.php == '7.0' }}
# Dependency patches for PHP7.1.
- run: rm composer.lock
if: ${{ matrix.php == '7.1' }}
- run: composer require --dev phpunit/phpunit:^7.5.0
if: ${{ matrix.php == '7.1' }}
# Dependency patches for PHP7.2.
- run: rm composer.lock
if: ${{ matrix.php == '7.2' }}
- run: composer require --dev phpunit/phpunit:^8.5.0
if: ${{ matrix.php == '7.2' }}
- run: composer install
- run: vendor/bin/psalm
if: hashFiles('vendor/bin/psalm') != ''
- run: mkdir -p test_results
- run: vendor/bin/phpunit --whitelist src --coverage-text tests/ | tee test_results/unit
- run: grep -E "^\s*Lines:\s*100\.00%\s*\([0-9]+\/[0-9]+\)\s*$" test_results/unit
shell: bash