forked from alleyinteractive/msm-sitemap
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
50 lines (42 loc) · 1.62 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
# Tell Travis CI we're using PHP
language: php
# PHP version used in first build configuration.
php:
- "7.0"
# WordPress version used in first build configuration.
env:
- WP_VERSION=latest
# Next we define our matrix of additional build configurations to test against.
# The versions listed above will automatically create our first configuration,
# so it doesn't need to be re-defined below.
# WP_VERSION specifies the tag to use. The way these tests are configured to run
# requires at least WordPress 3.8. Specify "latest" to test against SVN trunk.
# Note that Travis CI supports listing these above to automatically build a
# matrix of configurations, but we're being nice here by manually building a
# total of four configurations even though we're testing 4 versions of PHP
# along with 2 versions of WordPress (which would build 8 configs otherwise).
# This takes half as long to run while still providing adequate coverage.
matrix:
include:
- php: "5.4"
env: WP_VERSION=latest
- php: "5.4"
env: WP_VERSION=4.7
- php: "5.6"
env: WP_VERSION=latest
- php: "5.6"
env: WP_VERSION=4.7
# 7.0 / latest already included above as first build.
- php: "7.0"
env: WP_VERSION=4.7
before_script:
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- |
if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then
composer global require "phpunit/phpunit=5.7.*"
elif [[ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]]; then
composer global require "phpunit/phpunit=4.8.*"
fi
- phpunit --version
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
script: phpunit