forked from WP-API/WP-API
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
26 lines (22 loc) · 871 Bytes
/
.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
# Travis CI Configuration File
# Tell Travis CI we're using PHP
language: php
php:
- "5.2"
- "5.3"
- "5.4"
- "5.5"
# 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
- mkdir "/tmp/wordpress/src/wp-content/plugins/$PLUGIN_SLUG"
- cp -r . "/tmp/wordpress/src/wp-content/plugins/$PLUGIN_SLUG/"
- cd /tmp/wordpress
- 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