-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
57 lines (49 loc) · 1.32 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
language: php
sudo: false
notifications:
email:
on_success: never
on_failure: always
matrix:
allow_failures:
- php: hhvm
include:
- php: 7.0
env: WP_VERSION=4.6
- php: 7.0
env: WP_VERSION=4.5
- php: 7.0
env: WP_VERSION=4.4
- php: 5.6
env: WP_VERSION=4.6
- php: 5.5
env: WP_VERSION=4.6
- php: 5.4
env: WP_VERSION=4.6
- php: 5.3
env: WP_VERSION=4.6
- php: hhvm
env: WP_VERSION=4.6
cache:
directories:
- vendor
# - $HOME/.composer/cache
before_script:
- phpenv local 5.6
# - composer selfupdate 1.0.0 --no-interaction
# - composer install --no-interaction
- phpenv local --unset
- export PLUGIN_SLUG=$(basename $(pwd))
- export WP_DEVELOP_DIR=/tmp/wordpress/
- git clone --depth=50 --branch="$WP_VERSION" git://develop.git.wordpress.org/ /tmp/wordpress
- cd ..
- cp -r "$PLUGIN_SLUG" "/tmp/wordpress/src/wp-content/plugins/$PLUGIN_SLUG"
- cd /tmp/wordpress/
- 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
- mysql -e "CREATE DATABASE wordpress_tests;" -uroot
- cd "/tmp/wordpress/src/wp-content/plugins/$PLUGIN_SLUG"
- phpenv rehash
script: phpunit