forked from twitter/wordpress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
39 lines (33 loc) · 1.14 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
# Travis CI Configuration file
# enable containers
sudo: false
# PHP
language: php
# Test backwards compatibility
php:
- 5.6
- 5.5
- 5.4
env:
- WP_VERSION=4.1 WP_MULTISITE=0
- WP_VERSION=4.1 WP_MULTISITE=1
- WP_VERSION=4.0 WP_MULTISITE=0
- WP_VERSION=4.0 WP_MULTISITE=1
- WP_VERSION=3.9 WP_MULTISITE=0
- WP_VERSION=3.9 WP_MULTISITE=1
# Clones WordPress and configures our testing environment.
before_script:
- export PLUGIN_SLUG=$(basename $(pwd))
- git clone --depth=1 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"
script: phpunit