-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy path.travis.yml
executable file
·49 lines (44 loc) · 1.55 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
language: php
php:
- 5.6
- 7.0
# Declare which versions of WordPress to test against.
# Also declare whether or not to test in Multisite.
env:
- WP_VERSION=master WP_MULTISITE=0
- WP_VERSION=4.7 WP_MULTISITE=0
- WP_VERSION=4.8 WP_MULTISITE=0
- WP_VERSION=4.9 WP_MULTISITE=0
- WP_VERSION=5.0 WP_MULTISITE=0
- WP_VERSION=5.1 WP_MULTISITE=0
- WP_VERSION=master WP_MULTISITE=1
- WP_VERSION=4.7 WP_MULTISITE=1
- WP_VERSION=4.8 WP_MULTISITE=1
- WP_VERSION=4.9 WP_MULTISITE=1
- WP_VERSION=5.0 WP_MULTISITE=1
- WP_VERSION=5.1 WP_MULTISITE=1
services:
- mysql
install:
- composer install
# Use this to prepare your build for testing.
# e.g. copy database configurations, environment variables, etc.
# Failures in this section will result in build status 'errored'.
before_script:
- pwd
# Set up WordPress installation.
- export WP_DEVELOP_DIR=/tmp/wordpress/
- mkdir -p $WP_DEVELOP_DIR
# Use the Git mirror of WordPress.
- git clone --depth=1 --branch="$WP_VERSION" git://develop.git.wordpress.org/ $WP_DEVELOP_DIR
# Set up WordPress configuration.
- 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
# Create WordPress database.
- mysql -e 'CREATE DATABASE wordpress_test;' -uroot
# Switch back to the plugin dir
- cd $TRAVIS_BUILD_DIR