forked from xibodevelopment/backupwordpress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
86 lines (77 loc) · 2.12 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
82
83
84
85
86
language: php
sudo: false
php:
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
- 7.0
env:
# trunk:
- WP_VERSION=master WP_MULTISITE=0
- WP_VERSION=master WP_MULTISITE=1
# latest stable:
- WP_VERSION=4.3.1 WP_MULTISITE=0
# previous stable:
- WP_VERSION=4.2.5 WP_MULTISITE=0
# earliest supported:
- WP_VERSION=3.9.9 WP_MULTISITE=0
matrix:
allow_failures:
- php: hhvm
- php: 7.0
fast_finish: true
exclude:
# Only test latest version of WP with HHVM and PHP 7
- php: hhvm
env: WP_VERSION=3.9.9 WP_MULTISITE=0
- php: hhvm
env: WP_VERSION=4.2.5 WP_MULTISITE=0
- php: hhvm
env: WP_VERSION=4.3.1 WP_MULTISITE=0
- php: 7.0
env: WP_VERSION=3.9.9 WP_MULTISITE=0
- php: 7.0
env: WP_VERSION=4.2.5 WP_MULTISITE=0
- php: 7.0
env: WP_VERSION=4.3.1 WP_MULTISITE=0
cache:
directories:
- vendor
- $HOME/.composer/cache
before_install:
# set up WP install
- export WP_DEVELOP_DIR=/tmp/wordpress/
- mkdir -p $WP_DEVELOP_DIR
- git clone --depth=1 --branch $WP_VERSION git://develop.git.wordpress.org/ $WP_DEVELOP_DIR
# set up tests config
- cd $WP_DEVELOP_DIR
- 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
# set up database
- mysql -e 'CREATE DATABASE wordpress_test;' -uroot
- cd $TRAVIS_BUILD_DIR
install:
- git config --global user.email "[email protected]"
- git config --global user.name "Paul de Wouters"
notifications:
email: false
slack:
secure: ZyXhKGpR/VtggG3vcCaZ+50HBn4STi2fOvMKrmZaeS44s+j6lhkYt7qT1UeU1o2Vox2WCrdqfZqT370f4OV3izAgf7Ln+vIYxZvCywL2Cyt4YbHVPX0pMwuDuAW6a1zG5oP87CFZh9YYCHQ6HfX9ATKtnqiuMFx/SjOcD1Yb4Lk=
before_script:
- cd $TRAVIS_BUILD_DIR
- composer self-update
- composer install --no-interaction
script:
- cd $TRAVIS_BUILD_DIR
- |
if [[ "$TRAVIS_PHP_VERSION" == "5.6" && "$WP_VERSION" == "master" && "$WP_MULTISITE" == "0" ]] ; then
phpunit --coverage-clover=coverage.xml
else
phpunit
fi
git:
depth: 1