-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.travis.yml
67 lines (62 loc) · 1.84 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
sudo: false
dist: trusty
notifications:
email:
on_success: never
on_failure: change
env:
global:
- CPTDA_WP_TS_VERSION=trunk
matrix:
include:
- php: 7.2
env: WP_VERSION=latest WP_MULTISITE=0
- php: 7.2
env: WP_VERSION=latest WP_MULTISITE=1
- php: 7.2
env: WP_VERSION=5.4 WP_MULTISITE=0 CPTDA_WP_TS_VERSION=version
- php: 7.2
env: WP_VERSION=5.3 WP_MULTISITE=0 CPTDA_WP_TS_VERSION=version
- php: 7.1
env: WP_VERSION=latest WP_MULTISITE=0
- php: 7.0
env: WP_VERSION=latest WP_MULTISITE=0
- php: 5.6
env: WP_VERSION=latest WP_MULTISITE=0
before_script:
- |
if [[ 'trunk' != "$CPTDA_WP_TS_VERSION" ]]; then
bash bin/install-wp-tests.sh wordpress_test root '' --wp-version="$WP_VERSION" --wp-ts-version="$WP_VERSION"
else
bash bin/install-wp-tests.sh wordpress_test root '' --wp-version=trunk --wp-ts-version=trunk
fi
- |
# Export Composer's global bin dir to PATH, but not on PHP 5.2:
if [[ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]]; then
composer config --list --global
export PATH=`composer config --list --global | grep '\[home\]' | { read a; echo "${a#* }/vendor/bin:$PATH"; }`
fi
- |
# Install the specified version of PHPUnit depending on the PHP version:
case "$TRAVIS_PHP_VERSION" in
7.3|7.2|7.1|nightly)
echo "Using PHPUnit 7.x"
unit=7
[[ 'trunk' != "$CPTDA_WP_TS_VERSION" ]] && unit=6
travis_retry composer global require "phpunit/phpunit:^$unit"
;;
7.0)
echo "Using PHPUnit 6.x"
travis_retry composer global require "phpunit/phpunit:^6"
;;
5.6)
echo "Using PHPUnit 5.x"
travis_retry composer global require "phpunit/phpunit:^5"
;;
*)
echo "No PHPUnit version handling for PHP version $TRAVIS_PHP_VERSION"
exit 1
;;
esac
script: phpunit