-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
69 lines (58 loc) · 1.37 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
language: php
sudo: false
php:
- 5.4
- 5.5
- 5.6
- 7
- 7.1
env:
- WP_VERSION=trunk WP_MULTISITE=0
- WP_VERSION=tags/4.7 WP_MULTISITE=0
matrix:
allow_failures:
- env: WP_VERSION=trunk WP_MULTISITE=0
before_install:
- composer self-update
- composer install --no-interaction
# set up WP install
- export WP_DEVELOP_DIR=/tmp/wordpress/
- mkdir -p $WP_DEVELOP_DIR
before_script:
# download WP
- cd $WP_DEVELOP_DIR/..
- rm -rf wordpress
- mkdir wordpress
- svn co https://develop.svn.wordpress.org/$WP_VERSION $WP_DEVELOP_DIR
# set up tests config
- cd $WP_DEVELOP_DIR
- echo $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
script:
- |
if [[ "$TRAVIS_PHP_VERSION" == "7.1" && "$WP_VERSION" == "4.7" ]] ; then
phpunit --coverage-clover=coverage.clover
else
phpunit
fi
after_success:
- bash <(curl -s https://codecov.io/bash)
git:
depth: 3
branches:
only:
- master
notifications:
slack:
rooms:
- ironbounddesigns:fXMBlqSr9vvDBiwetLNm9ctD#general
on_success: change
on_failure: always
on_start: never
email: false