Skip to:
Content

bbPress.org

Changeset 5402 for trunk/.travis.yml


Ignore:
Timestamp:
06/14/2014 10:53:38 PM (10 years ago)
Author:
johnjamesjacoby
Message:

Travis Updates:

  • Switch to a 'shallow' Git clone of the official WordPress Git repo for faster WordPress upstream checkout.
  • The addition of the fast_finish: true flag in the build matrix will mark the build passed or errored as soon as a single build job has failed. Previously the build status was not reported until ALL tests had completed regardless of status.
  • Moves the 'build configuration' to before_install allowing non-bbPress test configuration to report as errored (MySQL database creation, and WordPress Git checkout etc). When a failure occurs in this section the build is marked as errored which is a more accurate description in that the environment we are setting up has failed and not the actual bbPress tests we are testing.
  • Introduces PHP 5.6 and HHVM testing into the build matrix, both of these are allowed to fail in that they will not be included in the overall build job failed, errored, or passed build status. This allows bbPress testing to play nice with these alpha/beta version of PHP/HHVM until stable and officially released.

Props netweb. See #2542.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.travis.yml

    r5272 r5402  
     1# Travis CI Configuration File
     2
     3# Tell Travis CI we're using PHP
    14language: php
    25
     6# PHP version used in first build configuration.
    37php:
    48    - 5.2
     
    711    - 5.5
    812
     13# WordPress versions uses Git 'develop' repo branches
    914env:
    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 # Git equivalent of SVN /trunk
     16    - WP_VERSION=3.9    # Includes latest 3.9.x release
     17    - WP_VERSION=3.8    # Includes latest 3.8.x release
     18    - WP_VERSION=3.7    # Includes latest 3.7.x release
    2019
    21 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
     20# Build matrix options
     21matrix:
     22  include:
     23    - php: 5.6
     24      env: WP_VERSION=master
     25    - php: hhvm
     26      env: WP_VERSION=master
     27  allow_failures:
     28    - php: 5.6
     29    - php: hhvm
     30  fast_finish: true
     31
     32# Before install, failures in this section will result in build status 'errored'
     33before_install:
     34    # setup WP_DEVELOP_DIR (needed for bbPress to bootstrap WP PHPUnit tests)
     35    - WP_DEVELOP_DIR=/tmp/wordpress
     36    # clone the WordPress develop repo
     37    - git clone --depth=1 --branch="$WP_VERSION" git://develop.git.wordpress.org/ $WP_DEVELOP_DIR
     38    - mv $TRAVIS_BUILD_DIR /tmp/wordpress/src/wp-content/plugins/bbpress
     39    - cd $WP_DEVELOP_DIR
     40    # setub db
     41    - mysql -e "CREATE DATABASE wordpress_test;" -uroot
     42    # setub wp-config
    3543    - cp wp-tests-config-sample.php wp-tests-config.php
    36     - sed -i "s:dirname( __FILE__ ) . '/wordpress/':'$WP_CORE_DIR':" wp-tests-config.php
    37     - sed -i "s/yourdbnamehere/wordpress_test/" wp-tests-config.php
     44    - sed -i "s/youremptytestdbnamehere/wordpress_test/" wp-tests-config.php
    3845    - sed -i "s/yourusernamehere/root/" wp-tests-config.php
    3946    - 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    - if [ "$TRAVIS_PHP_VERSION" == "5.5" ] && [ "$WP_VERSION" == "3.7" ]; then sed -i "s:define( 'WP_DEBUG://define( 'WP_DEBUG:" wp-tests-config.php; fi;
     48    # prepare for running bbPress' tests
     49    - BBP_DEVELOP_DIR=$WP_DEVELOP_DIR/src/wp-content/plugins/bbpress
     50    - cd $BBP_DEVELOP_DIR
     51    - npm install -g grunt-cli
    4452
    45 script: phpunit
     53# Before script, failures in this section will result in build status 'failed'
     54before_script:
     55  - npm install
     56  - grunt build
     57
     58script: grunt travis
    4659
    4760notifications:
    4861    email: false
    49 
    5062    irc:
    51         channels:
    52             - "irc.freenode.net#bbpress-dev"
    53         template:
    54             - "Build %{build_number} (%{branch} - %{commit}): %{message} %{build_url}"
     63      channels:
     64        - "irc.freenode.net#bbpress-dev"
     65      template:
     66        - "Build %{build_number} (%{branch} - %{commit}): %{message} %{build_url}"
Note: See TracChangeset for help on using the changeset viewer.