-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
76 lines (67 loc) · 2.52 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
# Travis CI Configuration File
# Use new Travis container-based infrastructure
# http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: false
# Tell Travis CI we're using PHP
language: php
# PHP version used in first build configuration.
php:
- 5.2
- 5.3
- 5.4
- 5.5
- 5.6
# WordPress versions uses Git 'develop' repo branches
env:
- WP_VERSION=master # Git equivalent of SVN /trunk
- WP_VERSION=4.1 # Includes latest 4.1.x release
- WP_VERSION=4.0 # Includes latest 4.0.x release
- WP_VERSION=3.9 # Includes latest 3.9.x release
- WP_VERSION=3.8 # Includes latest 3.8.x release
- WP_VERSION=3.7 # Includes latest 3.7.x release
# Build matrix options
matrix:
exclude:
- php: 5.6
env: WP_VERSION=3.7
include:
- php: hhvm
env: WP_VERSION=master
- php: nightly
env: WP_VERSION=master
allow_failures:
- php: hhvm
- php: nightly
fast_finish: true
# Before install, failures in this section will result in build status 'errored'
before_install:
# setup WP_DEVELOP_DIR (needed for bbPress to bootstrap WP PHPUnit tests)
- WP_DEVELOP_DIR=/tmp/wordpress
# clone the WordPress develop repo
- git clone --depth=1 --branch="$WP_VERSION" git://develop.git.wordpress.org/ $WP_DEVELOP_DIR
- mv $TRAVIS_BUILD_DIR /tmp/wordpress/src/wp-content/plugins/bbpress
- cd $WP_DEVELOP_DIR
# setub db
- mysql -e "CREATE DATABASE wordpress_test;" -uroot
# setub wp-config
- cp wp-tests-config-sample.php wp-tests-config.php
- sed -i "s/youremptytestdbnamehere/wordpress_test/" wp-tests-config.php
- sed -i "s/yourusernamehere/root/" wp-tests-config.php
- sed -i "s/yourpasswordhere//" wp-tests-config.php
- if [ "$TRAVIS_PHP_VERSION" == "5.5" ] && [ "$WP_VERSION" == "3.7" ]; then sed -i "s:define( 'WP_DEBUG://define( 'WP_DEBUG:" wp-tests-config.php; fi;
# prepare for running bbPress' tests
- BBP_DEVELOP_DIR=$WP_DEVELOP_DIR/src/wp-content/plugins/bbpress
- cd $BBP_DEVELOP_DIR
- npm install -g grunt-cli
# Before script, failures in this section will result in build status 'failed'
before_script:
- npm install
- grunt build
script: grunt travis
notifications:
email: false
irc:
channels:
- secure: "eRufY5taFDAuASgf9kB8oIC58lK9jLCTGVZ9Dr4M3Xxnwsj6t42Z5U9ZJ5wWAa0+9rf3UwbXj32Nd4QVvKWQL+IYTolX+LHzIidjKjYhOoCNr9HoMgjNOrjozXezKqqXzYKkPdX6drxk7JkK+ftx8qvVtZgRU8BS9sjhYDWh1X4="
template:
- "Build %{build_number} (%{branch} - %{commit}): %{message} %{build_url}"