Ticket #2542: 2542.travis.yml.diff
File 2542.travis.yml.diff, 3.4 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 versions to test. 3 7 php: 4 8 - 5.2 5 9 - 5.3 … … 6 10 - 5.4 7 11 - 5.5 8 12 13 # WordPress versions to test. 9 14 env: 10 - WP_VERSION=master WP_MULTISITE=0 11 - WP_VERSION=3.8 WP_MULTISITE=0 12 - WP_VERSION=3.7.1 WP_MULTISITE=0 13 - WP_VERSION=3.6.1 WP_MULTISITE=0 14 - WP_VERSION=3.5.2 WP_MULTISITE=0 15 - WP_VERSION=master WP_MULTISITE=1 16 - WP_VERSION=3.8 WP_MULTISITE=1 17 - WP_VERSION=3.7.1 WP_MULTISITE=1 18 - WP_VERSION=3.6.1 WP_MULTISITE=1 19 - WP_VERSION=3.5.2 WP_MULTISITE=1 15 - WP_VERSION=master 16 - WP_VERSION=3.9.0 17 - WP_VERSION=3.8.3 18 - WP_VERSION=3.7.3 20 19 20 # Build matrix custom includes, excludes and allowed failures 21 22 matrix: 23 include: 24 - php: 5.6 25 env: WP_VERSION=master 26 exclude: 27 - php: 5.5 28 env: WP_VERSION=3.7.3 29 allow_failures: 30 - php: 5.6 31 21 32 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 33 # setup WP_DEVELOP_DIR (needed for bbPress to bootstrap WP PhpUnit tests) 34 - WP_DEVELOP_DIR=/tmp/wordpress 35 # clone the WordPress develop repo 36 - git clone --depth=50 --branch="$WP_VERSION" git://develop.git.wordpress.org/ $WP_DEVELOP_DIR 37 - mv $TRAVIS_BUILD_DIR /tmp/wordpress/src/wp-content/plugins/bbpress 38 - cd $WP_DEVELOP_DIR 39 # setub db 40 - mysql -e "CREATE DATABASE wordpress_test;" -uroot 41 # setub wp-config 35 42 - 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.php43 - sed -i "s:dirname( __FILE__ ) . '/wordpress/':'$WP_DEVELOP_DIR':" wp-tests-config.php 44 - sed -i "s/youremptytestdbnamehere/wordpress_test/" wp-tests-config.php 38 45 - sed -i "s/yourusernamehere/root/" wp-tests-config.php 39 46 - 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 47 # prepare for running bbPress' tests 48 - BBP_DEVELOP_DIR=$WP_DEVELOP_DIR/src/wp-content/plugins/bbpress 49 - cd $BBP_DEVELOP_DIR 50 # 'build' bbPress 51 - npm install -g grunt-cli 52 - npm install 53 - grunt build 44 54 45 script: phpunit55 script: grunt travis 46 56 47 57 notifications: 48 58 email: false … … 51 61 channels: 52 62 - "irc.freenode.net#bbpress-dev" 53 63 template: 54 - "Build %{build_number} (%{branch} - %{commit}): %{message} %{build_url}" 55 No newline at end of file 64 - "Build %{build_number} (%{branch} - %{commit}): %{message} %{build_url}"