mirror of
https://gh.wpcy.net/https://github.com/buddypress/buddypress.git
synced 2026-06-01 05:49:21 +08:00
There is an upstream bug in WordPress causing fatal errors for one of our tests in PHP 7.1. It has not been fixed yet, and as I suspect the test itself is better suited for WordPress than BuddyPress (BuddyPress ought to assume that basic shortcode parsing is functional), I think this is a worthwhile tradeoff for now. See https://core.trac.wordpress.org/ticket/39277 and #7392 Props netweb git-svn-id: https://buddypress.svn.wordpress.org/trunk@11391 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
126 lines
3.8 KiB
YAML
126 lines
3.8 KiB
YAML
# Travis CI Configuration File
|
|
|
|
# Use new Travis container-based infrastructure
|
|
# http://docs.travis-ci.com/user/workers/container-based-infrastructure/
|
|
sudo: false
|
|
|
|
language: php
|
|
|
|
cache:
|
|
apt: true
|
|
directories:
|
|
- $HOME/.composer/cache
|
|
- $HOME/.rvm/gems
|
|
# - /tmp/wordpress/src/wp-content/plugins/buddypress/node_modules
|
|
|
|
php:
|
|
- 5.3
|
|
- 5.4
|
|
- 5.5
|
|
- 5.6
|
|
- 7.0
|
|
- 7.1
|
|
|
|
# WordPress comes from the Git mirror, where 'master' mirrors svn 'trunk' and
|
|
# x.y mirrors the latest from the x.y branch
|
|
env:
|
|
- WP_VERSION=master BP_TRAVISCI=travis:phpunit
|
|
- WP_VERSION=4.7 BP_TRAVISCI=travis:phpunit
|
|
- WP_VERSION=4.6 BP_TRAVISCI=travis:phpunit
|
|
- WP_VERSION=4.5 BP_TRAVISCI=travis:phpunit
|
|
- WP_VERSION=4.4 BP_TRAVISCI=travis:phpunit
|
|
- WP_VERSION=4.3 BP_TRAVISCI=travis:phpunit
|
|
|
|
matrix:
|
|
include:
|
|
- php: nightly
|
|
env: WP_VERSION=master BP_TRAVISCI=travis:phpunit
|
|
- php: 7.0
|
|
env: WP_VERSION=master BP_TRAVISCI=travis:grunt
|
|
- php: 7.0
|
|
env: WP_VERSION=master BP_TRAVISCI=travis:codecoverage
|
|
- php: hhvm
|
|
env: WP_VERSION=master BP_TRAVISCI=travis:phpunit
|
|
sudo: required
|
|
dist: trusty
|
|
group: edge
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- mysql-server-5.6
|
|
- mysql-client-core-5.6
|
|
- mysql-client-5.6
|
|
exclude:
|
|
- php: 7.1
|
|
env: WP_VERSION=4.6 BP_TRAVISCI=travis:phpunit
|
|
- php: 7.1
|
|
env: WP_VERSION=4.5 BP_TRAVISCI=travis:phpunit
|
|
- php: 7.1
|
|
env: WP_VERSION=4.4 BP_TRAVISCI=travis:phpunit
|
|
- php: 7.1
|
|
env: WP_VERSION=4.3 BP_TRAVISCI=travis:phpunit
|
|
allow_failures:
|
|
- php: 7.1
|
|
- php: nightly
|
|
- php: hhvm
|
|
- env: WP_VERSION=master BP_TRAVISCI=travis:codecoverage
|
|
|
|
# before_install: Failures in this section will result in build status 'errored'
|
|
before_install:
|
|
# scss-lint requires Ruby >= 2.2
|
|
- source ~/.rvm/scripts/rvm && rvm install 2.2.0 && rvm use 2.2.0
|
|
# set up WP install
|
|
- export WP_DEVELOP_DIR=/tmp/wordpress/
|
|
- mkdir -p $WP_DEVELOP_DIR
|
|
- git clone --depth=1 --branch="$WP_VERSION" git://develop.git.wordpress.org/ $WP_DEVELOP_DIR
|
|
- plugin_slug=$(basename $(pwd))
|
|
- plugin_dir=$WP_DEVELOP_DIR/src/wp-content/plugins/$plugin_slug
|
|
- cd ..
|
|
- mv $plugin_slug $plugin_dir
|
|
# Disable xdebug if not running codecoverage.
|
|
- if [[ "$BP_TRAVISCI" != "travis:codecoverage" ]] ; then phpenv config-rm xdebug.ini; fi
|
|
# set up tests config
|
|
- cd $WP_DEVELOP_DIR
|
|
- echo $WP_DEVELOP_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
|
|
# set up database
|
|
- mysql -e 'CREATE DATABASE wordpress_test;' -uroot
|
|
# prepare for running the tests
|
|
- cd $plugin_dir
|
|
- gem install scss_lint
|
|
# setup NodeJS version using NVM
|
|
- node --version
|
|
- nvm install 6
|
|
- node --version
|
|
- npm install -g grunt-cli
|
|
- npm --version
|
|
- mysql --version
|
|
- phpenv versions
|
|
- ruby --version
|
|
|
|
# before_script: Failures in this section will result in build status 'errored'
|
|
before_script:
|
|
- npm install
|
|
|
|
# Run tests
|
|
script: grunt $BP_TRAVISCI
|
|
|
|
after_script:
|
|
- |
|
|
if [[ "$BP_TRAVISCI" == "travis:codecoverage" ]] ; then
|
|
bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
|
|
fi
|
|
|
|
notifications:
|
|
email: false
|
|
|
|
irc:
|
|
channels:
|
|
- secure: "Z+gAlyOafrw0Xg294np+7IpqOKTsswGjAWyOZsbzT7Xo8uY1nmz8tTuU50Gpo8jo5HQqG9G0QgI3zB3Cxy3M5dF+J5oLl1lBz1zL0mtHiq1HoXi2cbVnGCCpxtMvYII6UmPUGAg8zvNUQol+cw1jb3PzLwEDfGcDH64o/Z3j8Gg="
|
|
template:
|
|
- "Build %{build_number} (%{branch} - %{commit}): %{message} %{build_url}"
|
|
slack:
|
|
secure: JQT+HWoVhLzoG00HmJscYZO+Gy7ywnIlrUbCaI7DxFdFOIkKxsTLLq9cKE4y3VqgZAARTOKjP1eQ7a5OEg1vT11Ow+rB7iUAMNmITxXO4feTOx1i2673xRNBro/SZMhlLd7DY2erbMDZaG9hBQB4xLXRYOvP29pLxf5zTSyZMyE=
|