Improve Travis CI configuration for better performance.
Props netweb, jorbin. Fixes #28301. git-svn-id: https://develop.svn.wordpress.org/trunk@28799 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
72a61e941d
commit
562d64a4a3
56
.travis.yml
56
.travis.yml
@ -1,19 +1,47 @@
|
||||
# Travis CI Configuration File
|
||||
|
||||
# Tell Travis CI we're using PHP
|
||||
language: php
|
||||
|
||||
php:
|
||||
- "5.2"
|
||||
- "5.3"
|
||||
- "5.4"
|
||||
- "5.5"
|
||||
# Build matrix options
|
||||
matrix:
|
||||
include:
|
||||
- php: 5.5
|
||||
env: WP_TRAVISCI=travis:js
|
||||
- php: 5.2
|
||||
env: WP_TRAVISCI=travis:phpunit
|
||||
- php: 5.3
|
||||
env: WP_TRAVISCI=travis:phpunit
|
||||
- php: 5.4
|
||||
env: WP_TRAVISCI=travis:phpunit
|
||||
- php: 5.5
|
||||
env: WP_TRAVISCI=travis:phpunit
|
||||
- php: 5.6
|
||||
env: WP_TRAVISCI=travis:phpunit
|
||||
- php: hhvm
|
||||
env: WP_TRAVISCI=travis:phpunit
|
||||
allow_failures:
|
||||
- php: 5.6
|
||||
- php: hhvm
|
||||
fast_finish: true
|
||||
|
||||
# Before install, failures in this section will result in build status 'errored'
|
||||
before_install:
|
||||
- WP_CORE_DIR=/tmp/wordpress/
|
||||
- >
|
||||
if [[ "$WP_TRAVISCI" == "travis:phpunit" ]]; then
|
||||
mysql -e "CREATE DATABASE wordpress_tests;" -uroot
|
||||
cp wp-tests-config-sample.php wp-tests-config.php
|
||||
sed -i "s/youremptytestdbnamehere/wordpress_tests/" wp-tests-config.php
|
||||
sed -i "s/yourusernamehere/travis/" 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
|
||||
|
||||
# Before script, failures in this section will result in build status 'failed'
|
||||
before_script:
|
||||
- mysql -e "CREATE DATABASE wordpress_tests;" -uroot
|
||||
- cp wp-tests-config-sample.php wp-tests-config.php
|
||||
- sed -i "s/youremptytestdbnamehere/wordpress_tests/" wp-tests-config.php
|
||||
- sed -i "s/yourusernamehere/travis/" 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
|
||||
- npm install -g grunt-cli
|
||||
- npm install
|
||||
- npm install -g grunt-cli
|
||||
- npm install
|
||||
|
||||
script: grunt travis
|
||||
# Script, failures in this section will result in build status 'failed'
|
||||
script: grunt $WP_TRAVISCI
|
||||
|
@ -473,7 +473,10 @@ module.exports = function(grunt) {
|
||||
['build', 'copy:qunit', 'qunit']);
|
||||
|
||||
grunt.registerTask('test', 'Runs all QUnit and PHPUnit tasks.', ['qunit:compiled', 'phpunit']);
|
||||
grunt.registerTask('travis', ['jshint', 'test']);
|
||||
|
||||
// Travis CI tasks.
|
||||
grunt.registerTask('travis:js', 'Runs Javascript Travis CI tasks.', [ 'jshint', 'qunit:compiled' ]);
|
||||
grunt.registerTask('travis:phpunit', 'Runs PHPUnit Travis CI tasks.', 'phpunit');
|
||||
|
||||
// Patch task.
|
||||
grunt.renameTask('patch_wordpress', 'patch');
|
||||
|
Loading…
x
Reference in New Issue
Block a user