-
Notifications
You must be signed in to change notification settings - Fork 42
/
.travis.yml
81 lines (74 loc) · 2.48 KB
/
.travis.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
70
71
72
73
74
75
76
77
78
79
80
81
language: php
os: linux
dist: trusty
php:
- 7.4
- 7.3
- 7.2
- 7.1
- 7.0
env:
global:
- XDEBUG_MODE=coverage
jobs:
- PHPUNIT_VERSION=8.4.*
- PHPUNIT_VERSION=8.4.* COMPOSER_VERSION=1.10.22
- PHPUNIT_VERSION=^7.5.0
- PHPUNIT_VERSION=^7.5.0 COMPOSER_VERSION=1.10.22
- PHPUNIT_VERSION=^6.5.0
- PHPUNIT_VERSION=^6.5.0 COMPOSER_VERSION=1.10.22
- PHPUNIT_VERSION=^5.7.0
- PHPUNIT_VERSION=^5.7.0 COMPOSER_VERSION=1.10.22
- PHPUNIT_VERSION=^4.8.0
- PHPUNIT_VERSION=^4.8.0 COMPOSER_VERSION=1.10.22
before_script:
- composer self-update ${COMPOSER_VERSION}
- composer require --dev --no-update "phpunit/phpunit":"${PHPUNIT_VERSION}"
- composer install
# dirty hack for compatible with old php versions
- >
if [ $(php -r 'echo version_compare(phpversion(), "7.1.0");') == "-1" ]; then
sed -i -- 's/\(protected function [A-Za-z0-9_-]*()\) : void/\1/g' tests/unit/Badoo/*Test.php;
fi
- mkdir -p /tmp/mocks/
- rm -rf /tmp/mocks_changed/
- vendor/bin/phpunit --version
script:
- vendor/bin/phpunit --verbose --colors -dxdebug.mode=coverage --coverage-clover=coverage.clover
- if [ -d /tmp/mocks_changed/ ]; then echo "Changed path shouldn't be found"; exit 1; else echo "Changed path not found"; fi;
- SOFT_MOCKS_CACHE_PATH=/tmp/mocks_changed/ vendor/bin/phpunit --verbose --filter='testRedefineMethod'
- if [ -d /tmp/mocks_changed/ ]; then echo "Changed path found"; else echo "Changed path should be found"; exit 1; fi;
after_success:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
jobs:
fast_finish: true
exclude:
- php: 7.0
env: PHPUNIT_VERSION=^7.5.0
- php: 7.0
env: PHPUNIT_VERSION=^7.5.0 COMPOSER_VERSION=1.10.22
- php: 7.0
env: PHPUNIT_VERSION=8.4.*
- php: 7.0
env: PHPUNIT_VERSION=8.4.* COMPOSER_VERSION=1.10.22
- php: 7.1
env: PHPUNIT_VERSION=^4.8.0
- php: 7.1
env: PHPUNIT_VERSION=^4.8.0 COMPOSER_VERSION=1.10.22
- php: 7.1
env: PHPUNIT_VERSION=8.4.*
- php: 7.1
env: PHPUNIT_VERSION=8.4.* COMPOSER_VERSION=1.10.22
- php: 7.2
env: PHPUNIT_VERSION=^4.8.0
- php: 7.2
env: PHPUNIT_VERSION=^4.8.0 COMPOSER_VERSION=1.10.22
- php: 7.3
env: PHPUNIT_VERSION=^4.8.0
- php: 7.3
env: PHPUNIT_VERSION=^4.8.0 COMPOSER_VERSION=1.10.22
- php: 7.4
env: PHPUNIT_VERSION=^4.8.0
- php: 7.4
env: PHPUNIT_VERSION=^4.8.0 COMPOSER_VERSION=1.10.22