forked from WPBuddy/largo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
53 lines (45 loc) · 1.77 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
50
51
52
53
# 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.
# 5.3 matches the version of php installed in the INN/deploy-tools virtualbox
# 5.5 matches http://phpinfo.wpengine.com/
php:
- "5.3"
- "5.5"
- "7.0"
# WordPress version used in first build configuration.
env:
- WP_VERSION=master
- WP_VERSION=4.6
- WP_VERSION=4.5
# Only test the unittests branch for now
branches:
only:
- develop
- master
# Clones WordPress and configures our testing environment.
before_script:
- export SLUG=$(basename $(pwd))
- export WP_TESTS_DIR=/tmp/wordpress/tests/phpunit
- export WP_CORE_DIR=/tmp/wordpress/
- git clone --depth=1 --branch="$WP_VERSION" git://develop.git.wordpress.org/ $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=