forked from WPBuddy/largo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (40 loc) · 1.82 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
# Travis CI Configuration File
# Use Travis CI container-based infrastructure
# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: false
# Tell Travis CI we're using PHP
language: php
# PHP version used in first build configuration.
php:
- "5.3"
# WordPress version used in first build configuration.
env:
- WP_VERSION=3.9.1 WP_TESTS_DIR=/tmp/wordpress/tests/phpunit WP_CORE_DIR=/tmp/wordpress
- WP_VERSION=4.0.1 WP_TESTS_DIR=/tmp/wordpress/tests/phpunit WP_CORE_DIR=/tmp/wordpress
- WP_VERSION=4.1.5 WP_TESTS_DIR=/tmp/wordpress/tests/phpunit WP_CORE_DIR=/tmp/wordpress
- WP_VERSION=4.2.2 WP_TESTS_DIR=/tmp/wordpress/tests/phpunit WP_CORE_DIR=/tmp/wordpress
# Only test the unittests branch for now
branches:
only:
- develop
- master
# Clones WordPress and configures our testing environment.
before_script:
- export SLUG=$(basename $(pwd))
- svn co --quiet http://develop.svn.wordpress.org/tags/$WP_VERSION $WP_CORE_DIR
- cd ..
- mv $SLUG "$WP_CORE_DIR/src/wp-content/themes/$SLUG"
- cd $WP_CORE_DIR
- mysql -e "CREATE DATABASE wordpress_tests;" -uroot
- cp wp-tests-config-sample.php wp-tests-config.php
- sed -i "s:dirname( __FILE__ ) . '/src/':'$WP_CORE_DIR/src/':" 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
- mv wp-tests-config.php "$WP_TESTS_DIR/wp-tests-config.php"
- cd "$WP_CORE_DIR/src/wp-content/themes/$SLUG"
script: phpunit
notifications:
hipchat:
rooms:
secure: mrJDwl2LYmWGY6gKUEsSnbGp3mQ8UhVQkb9oBmRSDx9T/hCSDx4Q2KDLo0OqCFIwDB5BevP16vDDWVmsg8Ldwk+Hh0YAmdUqBAXe21+17ojqSIAdQg6LgLrEFEBNVBlPu89xonRMnsai34RDCoRt5c9OLuWgGVMAcTojpQvPiII=