forked from Automattic/jetpack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
81 lines (70 loc) · 2.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Travis CI Configuration File
# Tell Travis CI we're using PHP
language: php
# PHP version used in first build configuration.
php:
- "5.6"
# WordPress version used in first build configuration.
env:
- WP_VERSION=master WP_TRAVISCI=travis:phpunit
# 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 "master" to test against SVN trunk.
matrix:
include:
- php: "nightly"
env: WP_VERSION=master WP_TRAVISCI=travis:phpunit
# Disabling PHP nightly / 4.2.0 as it throws same name class constructor notices fixed in 4.3.
#- php: "nightly"
# env: WP_VERSION=4.2.0
- php: "nightly"
env: WP_VERSION=4.3.0 WP_TRAVISCI=travis:phpunit
- php: "5.2"
env: WP_VERSION=master WP_TRAVISCI=travis:phpunit
- php: "5.2"
env: WP_VERSION=4.2.0 WP_TRAVISCI=travis:phpunit
- php: "5.2"
env: WP_VERSION=4.3.0 WP_TRAVISCI=travis:phpunit
# 5.6 / master already included above as first build.
- php: "5.6"
env: WP_VERSION=4.2.0 WP_TRAVISCI=travis:phpunit
- php: "5.6"
env: WP_VERSION=4.3.0 WP_TRAVISCI=travis:phpunit
# Clones WordPress and configures our testing environment.
before_script:
- export PLUGIN_SLUG=$(basename $(pwd))
- git clone --depth=1 --branch $WP_VERSION git://develop.git.wordpress.org/ /tmp/wordpress
# - git clone . "/tmp/wordpress/src/wp-content/plugins/$PLUGIN_SLUG"
- cd ..
- mv $PLUGIN_SLUG "/tmp/wordpress/src/wp-content/plugins/$PLUGIN_SLUG"
- cd /tmp/wordpress
- git checkout $WP_VERSION
- mysql -e "CREATE DATABASE wordpress_tests;" -uroot
- cp wp-tests-config-sample.php wp-tests-config.php
- sed -i "s/youremptytestdbnamehere/wordpress_tests/" wp-tests-config.php
- sed -i "s/yourusernamehere/travis/" wp-tests-config.php
- sed -i "s/yourpasswordhere//" wp-tests-config.php
- cd "/tmp/wordpress/src/wp-content/plugins/$PLUGIN_SLUG"
- gem install sass
- gem install compass
- npm install -g npm
- npm install -g grunt-cli
- npm install
script: grunt $WP_TRAVISCI
sudo: false
notifications:
email:
# Encrypted Slack notification address.
- secure: "WQdTdmYuifSW0hiJGXpQGKystMASC50QvxHlyUL5SM3h5GP8aCgeSsHuXvKPe3dT3Pffhk0dSHBfDtdWFwSHW/upURhg0vs4dm7+nxxvGZiTPzKcuAIjgvCoqWM7teyda/XqFGNSnv+XsT34uoyPhhFgd45T3oS+QQ3aNCruFak="