-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
57 lines (51 loc) · 1.23 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
sudo: false
language: php
dist: trusty
notifications:
email: never
cache:
directories:
- $HOME/.composer/cache
matrix:
fast_finish: true
include:
- php: 7.2
env: WP_VERSION=trunk
- php: 7.2
env: WP_VERSION=latest RUN_PHPCS=1 RUN_CODE_COVERAGE=1
- php: 7.1
env: WP_VERSION=latest
- php: 7.0
env: WP_VERSION=latest
before_script:
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- |
if [[ ${RUN_CODE_COVERAGE} ]]; then
wget https://github.com/php-coveralls/php-coveralls/releases/download/v1.0.0/coveralls.phar
chmod +x coveralls.phar
mkdir -p build/logs
else
phpenv config-rm xdebug.ini
fi
- |
if [[ ! -z "$WP_VERSION" ]]; then
bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
composer global require "phpunit/phpunit=4.8.*|5.7.*"
fi
- composer install --prefer-dist --no-suggest --no-autoloader
script:
- |
if [[ ${RUN_CODE_COVERAGE} ]]; then
phpunit --coverage-clover build/logs/clover.xml
else
phpunit
fi
- |
if [[ ${RUN_PHPCS} == 1 ]]; then
./vendor/bin/phpcs
fi
after_success:
- |
if [[ ${RUN_CODE_COVERAGE} ]]; then
travis_retry php coveralls.phar
fi