Ticket #2542: 2542.13.diff
File 2542.13.diff, 3.2 KB (added by , 10 years ago) |
---|
-
.travis.yml
1 # Travis CI Configuration File 2 3 # Tell Travis CI we're using PHP 1 4 language: php 2 5 6 # PHP version used in first build configuration. 3 7 php: 4 8 - 5.2 5 9 - 5.3 … … 6 10 - 5.4 7 11 - 5.5 8 12 13 # WordPress versions 3.7.x and above as 'develop' repo 9 14 env: 10 15 - WP_VERSION=master WP_MULTISITE=0 11 - WP_VERSION=3.8 WP_MULTISITE=016 - WP_VERSION=3.8.1 WP_MULTISITE=0 12 17 - WP_VERSION=3.7.1 WP_MULTISITE=0 13 - WP_VERSION=3.6.1 WP_MULTISITE=014 - WP_VERSION=3.5.2 WP_MULTISITE=015 18 - WP_VERSION=master WP_MULTISITE=1 16 - WP_VERSION=3.8 WP_MULTISITE=119 - WP_VERSION=3.8.1 WP_MULTISITE=1 17 20 - WP_VERSION=3.7.1 WP_MULTISITE=1 18 - WP_VERSION=3.6.1 WP_MULTISITE=119 - WP_VERSION=3.5.2 WP_MULTISITE=120 21 21 22 before_script: 22 # set up WP install 23 - WP_CORE_DIR=/tmp/wordpress/ 24 - wget -nv -O /tmp/wordpress.tar.gz https://github.com/WordPress/WordPress/tarball/$WP_VERSION 25 - mkdir -p $WP_CORE_DIR 26 - tar --strip-components=1 -zxmf /tmp/wordpress.tar.gz -C $WP_CORE_DIR 27 - plugin_slug=$(basename $(pwd)) 28 - plugin_dir=$WP_CORE_DIR/wp-content/plugins/$plugin_slug 29 - cd .. 30 - mv $plugin_slug $plugin_dir 31 # set up testing suite 32 - export WP_TESTS_DIR=/tmp/wordpress-tests/ 33 - svn co --ignore-externals http://unit-tests.svn.wordpress.org/trunk/ $WP_TESTS_DIR 34 - cd $WP_TESTS_DIR 23 # setup WP_DEVELOP_DIR (needed for bbPress to bootstrap WP PhpUnit tests) 24 - WP_DEVELOP_DIR=/tmp/wordpress 25 # clone the WordPress develop repo 26 - git clone git://develop.git.wordpress.org/ $WP_DEVELOP_DIR 27 - mv $TRAVIS_BUILD_DIR /tmp/wordpress/src/wp-content/plugins/bbpress 28 - cd $WP_DEVELOP_DIR 29 - git checkout $WP_VERSION 30 # setub db 31 - mysql -e "CREATE DATABASE wordpress_test;" -uroot 32 # setub wp-config 35 33 - cp wp-tests-config-sample.php wp-tests-config.php 36 - sed -i "s:dirname( __FILE__ ) . '/wordpress/':'$WP_ CORE_DIR':" wp-tests-config.php37 - sed -i "s/your dbnamehere/wordpress_test/" wp-tests-config.php34 - sed -i "s:dirname( __FILE__ ) . '/wordpress/':'$WP_DEVELOP_DIR':" wp-tests-config.php 35 - sed -i "s/youremptytestdbnamehere/wordpress_test/" wp-tests-config.php 38 36 - sed -i "s/yourusernamehere/root/" wp-tests-config.php 39 37 - sed -i "s/yourpasswordhere//" wp-tests-config.php 40 # set up database 41 - mysql -e 'CREATE DATABASE wordpress_test;' -uroot 42 # prepare for running the tests 43 - cd $plugin_dir/tests 38 # prepare for running bbPress' tests 39 - BBP_DEVELOP_DIR=$WP_DEVELOP_DIR/src/wp-content/plugins/bbpress 40 - cd $BBP_DEVELOP_DIR 41 # 'build' bbPress 42 - npm install -g grunt-cli 43 - npm install 44 - grunt build 44 45 45 script: phpunit46 script: grunt travis 46 47 47 48 notifications: 48 49 email: false -
Gruntfile.js
290 290 291 291 grunt.registerTask( 'jstest', 'Runs all javascript tasks.', [ 'jsvalidate', 'jshint' ] ); 292 292 293 grunt.registerTask('travis', ['phpunit']); 294 293 295 // Default task. 294 296 grunt.registerTask( 'default', [ 'build' ] ); 295 297