2014-12-22 23:25:40 +00:00
|
|
|
sudo: false
|
2013-12-02 19:41:26 +00:00
|
|
|
language: php
|
2016-03-22 21:49:36 +00:00
|
|
|
cache:
|
2016-05-25 06:11:20 +00:00
|
|
|
apt: true
|
2016-03-22 21:49:36 +00:00
|
|
|
directories:
|
|
|
|
- node_modules
|
2016-05-25 06:11:20 +00:00
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- WP_TRAVISCI=travis:phpunit
|
2014-06-21 20:05:19 +00:00
|
|
|
matrix:
|
|
|
|
include:
|
2016-05-25 06:11:20 +00:00
|
|
|
- php: 7
|
2014-12-17 23:50:37 +00:00
|
|
|
env: WP_TRAVISCI=travis:js
|
2015-02-18 17:46:18 +00:00
|
|
|
- php: 5.2
|
2014-12-17 23:50:37 +00:00
|
|
|
- php: 5.3
|
|
|
|
- php: 5.4
|
|
|
|
- php: 5.5
|
|
|
|
- php: 5.6
|
2015-10-15 22:51:38 +00:00
|
|
|
- php: 5.6
|
2016-05-25 06:11:20 +00:00
|
|
|
env: WP_TRAVIS_OBJECT_CACHE=true
|
2015-10-15 22:51:38 +00:00
|
|
|
services: memcached
|
2014-12-17 23:50:37 +00:00
|
|
|
- php: hhvm
|
2016-05-25 06:11:20 +00:00
|
|
|
sudo: required
|
|
|
|
dist: trusty
|
|
|
|
group: edge
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- mysql-server-5.6
|
|
|
|
- mysql-client-core-5.6
|
|
|
|
- mysql-client-5.6
|
2015-07-27 15:15:34 +00:00
|
|
|
- php: 7.0
|
2016-08-17 20:45:07 +00:00
|
|
|
- php: 7.1
|
2015-10-02 16:50:53 +00:00
|
|
|
- php: nightly
|
2014-06-21 20:05:19 +00:00
|
|
|
allow_failures:
|
2014-12-17 23:50:37 +00:00
|
|
|
- php: hhvm
|
2015-10-02 16:50:53 +00:00
|
|
|
- php: nightly
|
2014-06-21 20:05:19 +00:00
|
|
|
before_install:
|
2014-12-17 23:50:37 +00:00
|
|
|
- |
|
|
|
|
if [[ "$WP_TRAVISCI" == "travis:phpunit" ]]; then
|
2016-05-25 06:11:20 +00:00
|
|
|
mysql -u root -e "CREATE DATABASE wordpress_tests;"
|
2014-12-17 23:50:37 +00:00
|
|
|
cp wp-tests-config-sample.php wp-tests-config.php
|
|
|
|
sed -i "s/youremptytestdbnamehere/wordpress_tests/" wp-tests-config.php
|
2016-05-25 06:11:20 +00:00
|
|
|
sed -i "s/yourusernamehere/root/" wp-tests-config.php
|
2014-12-17 23:50:37 +00:00
|
|
|
sed -i "s/yourpasswordhere//" wp-tests-config.php
|
|
|
|
svn checkout https://plugins.svn.wordpress.org/wordpress-importer/trunk tests/phpunit/data/plugins/wordpress-importer
|
|
|
|
fi
|
2015-10-15 22:51:38 +00:00
|
|
|
- |
|
|
|
|
if [[ "$WP_TRAVIS_OBJECT_CACHE" == "true" ]]; then
|
2015-10-16 14:15:18 +00:00
|
|
|
curl https://raw.githubusercontent.com/tollmanz/wordpress-pecl-memcached-object-cache/584392b56dc4adbe52bd2c7b86f875e23a3e5f75/object-cache.php > src/wp-content/object-cache.php
|
2015-10-15 22:51:38 +00:00
|
|
|
echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
|
|
|
fi
|
2013-12-02 19:41:26 +00:00
|
|
|
before_script:
|
2017-03-09 21:47:20 +00:00
|
|
|
- |
|
|
|
|
stable='^[0-9\.]+$'
|
|
|
|
if [[ "$TRAVIS_PHP_VERSION" =~ $stable ]]; then
|
|
|
|
phpenv config-rm xdebug.ini
|
|
|
|
fi
|
2017-03-09 19:13:25 +00:00
|
|
|
- export PATH="$HOME/.composer/vendor/bin:$PATH"
|
|
|
|
- |
|
|
|
|
if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then
|
|
|
|
composer global require "phpunit/phpunit=5.7.*"
|
2017-03-09 20:53:37 +00:00
|
|
|
elif [[ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]]; then
|
2017-03-09 19:13:25 +00:00
|
|
|
composer global require "phpunit/phpunit=4.8.*"
|
|
|
|
fi
|
2017-03-09 21:08:09 +00:00
|
|
|
- npm --version
|
|
|
|
- node --version
|
|
|
|
- nvm install 6.9.1
|
2014-12-17 23:50:37 +00:00
|
|
|
- npm install -g grunt-cli
|
|
|
|
- npm install
|
2016-05-01 20:03:59 +00:00
|
|
|
- npm prune
|
2016-05-25 06:11:20 +00:00
|
|
|
- mysql --version
|
|
|
|
- phpenv versions
|
2017-02-27 22:53:46 +00:00
|
|
|
- php --version
|
2017-03-10 15:30:33 +00:00
|
|
|
- |
|
|
|
|
if [[ "$TRAVIS_PHP_VERSION" != 'hhvm' ]]; then
|
|
|
|
php -m
|
|
|
|
fi
|
2016-06-16 17:27:22 +00:00
|
|
|
- npm --version
|
|
|
|
- node --version
|
2017-03-09 19:13:25 +00:00
|
|
|
- phpunit --version
|
2017-03-09 21:47:20 +00:00
|
|
|
- curl --version
|
|
|
|
- grunt --version
|
|
|
|
- git --version
|
|
|
|
- svn --version
|
2014-06-21 20:05:19 +00:00
|
|
|
script: grunt $WP_TRAVISCI
|
2014-12-17 23:50:37 +00:00
|
|
|
notifications:
|
|
|
|
slack:
|
2015-09-26 00:03:24 +00:00
|
|
|
rooms:
|
|
|
|
secure: WuMCpfgrm0GIdPbYzsGOsakZ5x7QIbEBwD+CPHVXGKbL3ZbqQ+BVcDRnMiwzxjgf1vzg2de0taXCSMGKBxsWce23NZkOnmwPdIB8XOnwDV7T7zylgYD5S7p3gI6gV0l8Y3/gROdXFZap6viC1qRr4E79ow53RKk7E3WyOo7TWqo=
|
2015-09-25 20:12:09 +00:00
|
|
|
on_start: never
|
|
|
|
on_failure: always
|
|
|
|
on_success: change
|
2016-04-20 17:08:13 +00:00
|
|
|
on_pull_requests: false
|