-
Notifications
You must be signed in to change notification settings - Fork 79
/
Copy path.travis.yml
35 lines (29 loc) · 947 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
27
28
29
30
31
32
33
34
35
language: php
sudo: false
matrix:
include:
- php: 7.1
- php: 7.0
- php: 5.6
- php: 5.5
- php: 5.4
- php: hhvm
before_install:
# Setup WP_TESTS_DIR (needed to bootstrap WP PHPUnit tests).
- export WP_TESTS_DIR=/tmp/wordpress/tests/phpunit/
# Clone the WordPress develop repo.
- git clone --depth=1 --branch="4.3" git://develop.git.wordpress.org/ /tmp/wordpress/
# Setup DB.
- mysql -e "CREATE DATABASE wordpress_test;" -uroot
# Setup wp-config.
- cp /tmp/wordpress/wp-tests-config-sample.php /tmp/wordpress/wp-tests-config.php
- sed -i "s/youremptytestdbnamehere/wordpress_test/" /tmp/wordpress/wp-tests-config.php
- sed -i "s/yourusernamehere/root/" /tmp/wordpress/wp-tests-config.php
- sed -i "s/yourpasswordhere//" /tmp/wordpress/wp-tests-config.php
install: composer install --no-dev
script:
- phpunit
cache:
directories:
- vendor
- $HOME/.composer/cache