buddypress/.travis.yml
Paul Gibbs 65cb132605 Unit Tests: on travis-ci with PHP 5.5.*, don't run the tests with WP_DEBUG=true.
PHP 5.5+ uses the `ext/mysqli` library and as versions of WordPress older than the current trunk don't support `mysqli`, PHP throws a bunch of `E_DEPRECATED` warnings about the use of the deprecated `ext/mysql` library. Because we test several versions of WordPress against several versions of PHP, combinations occur with old WordPress and new PHP, which causes these deprecation notices, causing failures.

A better solution would be to somehow suppress `E_DEPRECATED` warnings in the phpUnit configuration or change the error levels that `WP_DEBUG` sets, but so far I've been unable to find a way to do this. For now, travis-ci tests against PHP 5.5 will run with `WP_DEBUG=false`; this is actually the environment we've been testing in on travis-ci until very recently (see r8015).

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8018 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
2014-03-02 16:05:37 +00:00

48 lines
1.5 KiB
YAML

language: php
php:
- 5.2
- 5.3
- 5.4
- 5.5
env:
- WP_VERSION=trunk WP_MULTISITE=0
- WP_VERSION=tags/3.8.1 WP_MULTISITE=0
- WP_VERSION=tags/3.7.1 WP_MULTISITE=0
- WP_VERSION=trunk WP_MULTISITE=1
- WP_VERSION=tags/3.8.1 WP_MULTISITE=1
- WP_VERSION=tags/3.7.1 WP_MULTISITE=1
before_script:
# set up WP install
- WP_CORE_DIR=/tmp/wordpress/
- mkdir -p $WP_CORE_DIR
- svn co --ignore-externals https://develop.svn.wordpress.org/$WP_VERSION $WP_CORE_DIR
- plugin_slug=$(basename $(pwd))
- plugin_dir=$WP_CORE_DIR/src/wp-content/plugins/$plugin_slug
- cd ..
- mv $plugin_slug $plugin_dir
# set up tests config
- cd $WP_CORE_DIR
- cp wp-tests-config-sample.php wp-tests-config.php
- sed -i "s/youremptytestdbnamehere/wordpress_test/" wp-tests-config.php
- sed -i "s/yourusernamehere/root/" wp-tests-config.php
- sed -i "s/yourpasswordhere//" wp-tests-config.php
# disable WP_DEBUG for PHP 5.5 due to ext/mysqli E_DEPRECATED errors
- if [[ "$TRAVIS_PHP_VERSION" == 5.5* ]] ; then sed -i "s:define( 'WP_DEBUG://define( 'WP_DEBUG:" wp-tests-config.php; fi;
# set up database
- mysql -e 'CREATE DATABASE wordpress_test;' -uroot
# prepare for running the tests
- cd $plugin_dir/tests
script: phpunit
notifications:
email: false
irc:
channels:
- "irc.freenode.net#buddypress-dev"
template:
- "Build %{build_number} (%{branch} - %{commit}): %{message} %{build_url}"