-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
78 lines (71 loc) · 2.01 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
language: php
sudo: false
dist: trusty
matrix:
include:
- php: nightly
env: WP_VERSION=latest
- php: 7.1
env: WP_VERSION=latest
- php: 5.6
env: WP_VERSION=latest
- php: 5.6
env: WP_VERSION=3.8
# Remove 5.3 or Travis build becomes too large.
# - php: 7.1
# env: WP_VERSION=latest SWITCH_TO_PHP=5.3
# - php: 7.1
# env: WP_VERSION=3.8 SWITCH_TO_PHP=5.3
- php: 7.1
env: WP_VERSION=latest SWITCH_TO_PHP=5.2
- php: 7.1
env: WP_VERSION=3.8 SWITCH_TO_PHP=5.2
- php: 5.4
env: WP_VERSION=latest
- php: 5.4
env: WP_VERSION=3.8
fast_finish: true
allow_failures:
- env: WP_VERSION=3.8
php: nightly
- env: WP_VERSION=3.8
php: 7.1
- env: WP_VERSION=latest
php: nightly
cache:
directories:
- vendor
- $HOME/.composer/cache
- $HOME/.phpbrew
before_script: # Make PHP 7 test work. https://github.com/CMB2/CMB2/pull/885
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- |
if [[ ! -z "$WP_VERSION" ]] ; then
set -e
bash tests/bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
source tests/bin/install-php-phpunit.sh
set +e
fi
- phpunit --version
script: if [[ latest == $WP_VERSION ]]; then phpunit --coverage-clover=coverage.clover; else phpunit --exclude-group cmb2-rest-api --coverage-clover=coverage.clover; fi
after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
branches:
only:
- master
- trunk
notifications:
slack:
rooms:
- secure: g3L0XaiaUjUeBoNMLXx4pdz+7JudZhFGPY1mOX1WkC4B0zo+M/tGdhLLz/
on_success: never
on_failure: change
webhooks:
urls:
- https://webhooks.gitter.im/e/00b1df026574cdaeb815
on_success: never # options: [always|never|change] default: always
on_failure: change # options: [always|never|change] default: always
email:
on_success: never # default: change
on_failure: change # default: always