-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
67 lines (61 loc) · 1.49 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
language: php
dist: trusty
notifications:
email: never
cache:
directories:
- $HOME/.composer/cache
matrix:
fast_finish: true
include:
- php: 7.4
env: WP_VERSION=trunk
- php: 7.4
env: WP_VERSION=trunk COMPOSER_LOWEST=1
- php: 7.3
env: WP_VERSION=latest RUN_PHPCS=1 RUN_CODE_COVERAGE=1
- php: 7.3
env: WP_VERSION=latest
- php: 7.2
env: WP_VERSION=latest
- 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 || echo 'No xdebug config.'
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
- |
if [[ ${COMPOSER_LOWEST} ]]; then
composer update $COMPOSER_ARGS
else
composer install --prefer-dist --no-suggest --no-autoloader
fi
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