Wordpress/.travis.yml
Aaron Jorbin 1bdd60ef65 Build/Test Tools: Ensure PHP 7.1 is tested on Travis.
PHP 7.1 is the next version of PHP and WordPress should support it with the first major version after 7.1 launches. This will facilitate testing. Failures on 7.1 won't necessitate builds failing while 7.1 is still in beta.

Fixes #37625.



git-svn-id: https://develop.svn.wordpress.org/trunk@38273 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-17 20:45:07 +00:00

73 lines
2.0 KiB
YAML

sudo: false
language: php
cache:
apt: true
directories:
- node_modules
env:
global:
- WP_TRAVISCI=travis:phpunit
matrix:
include:
- php: 7
env: WP_TRAVISCI=travis:js
- php: 5.2
- php: 5.3
- php: 5.4
- php: 5.5
- php: 5.6
- php: 5.6
env: WP_TRAVIS_OBJECT_CACHE=true
services: memcached
- php: hhvm
sudo: required
dist: trusty
group: edge
addons:
apt:
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
- php: 7.0
- php: 7.1
- php: nightly
allow_failures:
- php: hhvm
- php: nightly
- php: 7.1
before_install:
- git clone https://github.com/WordPress/twentysixteen.git src/wp-content/themes/twentysixteen
- |
if [[ "$WP_TRAVISCI" == "travis:phpunit" ]]; then
mysql -u root -e "CREATE DATABASE wordpress_tests;"
cp wp-tests-config-sample.php wp-tests-config.php
sed -i "s/youremptytestdbnamehere/wordpress_tests/" wp-tests-config.php
sed -i "s/yourusernamehere/root/" wp-tests-config.php
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
- |
if [[ "$WP_TRAVIS_OBJECT_CACHE" == "true" ]]; then
curl https://raw.githubusercontent.com/tollmanz/wordpress-pecl-memcached-object-cache/584392b56dc4adbe52bd2c7b86f875e23a3e5f75/object-cache.php > src/wp-content/object-cache.php
echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
fi
before_script:
- npm install -g npm
- npm install -g grunt-cli
- npm install
- npm prune
- mysql --version
- phpenv versions
- npm --version
- node --version
script: grunt $WP_TRAVISCI
notifications:
slack:
rooms:
secure: WuMCpfgrm0GIdPbYzsGOsakZ5x7QIbEBwD+CPHVXGKbL3ZbqQ+BVcDRnMiwzxjgf1vzg2de0taXCSMGKBxsWce23NZkOnmwPdIB8XOnwDV7T7zylgYD5S7p3gI6gV0l8Y3/gROdXFZap6viC1qRr4E79ow53RKk7E3WyOo7TWqo=
on_start: never
on_failure: always
on_success: change
on_pull_requests: false