forked from TablePress/TablePress
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
35 lines (30 loc) · 1.06 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
# Travis CI Configuration File
language: php
php:
- 5.2
- 5.3
- 5.4
- 5.5
- 5.6
env:
- WP_VERSION=master WP_MULTISITE=0
- WP_VERSION=master WP_MULTISITE=1
- WP_VERSION=4.0.1 WP_MULTISITE=0
- WP_VERSION=4.0.1 WP_MULTISITE=1
# Clone WordPress and configure the testing environment.
before_script:
- export WP_DEVELOP_DIR=/tmp/wordpress
- export WP_TESTS_DIR=$WP_DEVELOP_DIR/tests/phpunit/
- export PLUGIN_SLUG=$(basename $(pwd))
- export PLUGIN_SLUG_LC=${PLUGIN_SLUG,,}
- git clone --depth=50 --branch="$WP_VERSION" git://develop.git.wordpress.org/ $WP_DEVELOP_DIR
- cd ..
- mv "$PLUGIN_SLUG" "$WP_DEVELOP_DIR/src/wp-content/plugins/$PLUGIN_SLUG_LC"
- cd $WP_DEVELOP_DIR
- 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 "$WP_DEVELOP_DIR/src/wp-content/plugins/$PLUGIN_SLUG_LC"
script: phpunit