Skip to:
Content

bbPress.org

Changeset 5699


Ignore:
Timestamp:
04/21/2015 04:41:24 AM (10 years ago)
Author:
netweb
Message:

Tests: Travis CI Improvements

  • Brings .travis.yml configuration up to speed with BuddyPress'
  • Preliminary support for side-by-side BuddyPress testing integration

Props netweb. See #2782

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.travis.yml

    r5619 r5699  
    1616    - 5.6
    1717
    18 # WordPress versions uses Git 'develop' repo branches
     18# WordPress comes from the Git mirror, where 'master' mirrors svn 'trunk' and
     19# x.y mirrors the latest from the x.y branch
    1920env:
    20     - WP_VERSION=master # Git equivalent of SVN /trunk
    21     - WP_VERSION=4.1    # Includes latest 4.1.x release
    22     - WP_VERSION=4.0    # Includes latest 4.0.x release
    23     - WP_VERSION=3.9    # Includes latest 3.9.x release
    24     - WP_VERSION=3.8    # Includes latest 3.8.x release
    25     - WP_VERSION=3.7    # Includes latest 3.7.x release
     21    - WP_VERSION=master
     22    - WP_VERSION=4.1
     23    - WP_VERSION=4.0
     24    - WP_VERSION=3.9
     25    - WP_VERSION=3.8
     26    - WP_VERSION=3.7
    2627
    2728# Build matrix options
    2829matrix:
    29   exclude:
    30     - php: 5.6
    31       env: WP_VERSION=3.7
    3230  include:
     31    - php: 7.0
     32      env: WP_VERSION=master
    3333    - php: hhvm
    3434      env: WP_VERSION=master
    35     - php: nightly
     35    - php: hhvm-nightly
    3636      env: WP_VERSION=master
    3737  allow_failures:
     38    - php: 7.0
    3839    - php: hhvm
    39     - php: nightly
     40    - php: hhvm-nightly
    4041  fast_finish: true
    4142
    42 # Before install, failures in this section will result in build status 'errored'
     43# before_install: Failures in this section will result in build status 'errored'
    4344before_install:
    4445    # setup WP_DEVELOP_DIR (needed for bbPress to bootstrap WP PHPUnit tests)
    45     - WP_DEVELOP_DIR=/tmp/wordpress
     46    - export WP_DEVELOP_DIR=/tmp/wordpress/
     47    - mkdir -p $WP_DEVELOP_DIR
    4648    # clone the WordPress develop repo
    4749    - git clone --depth=1 --branch="$WP_VERSION" git://develop.git.wordpress.org/ $WP_DEVELOP_DIR
    48     - mv $TRAVIS_BUILD_DIR /tmp/wordpress/src/wp-content/plugins/bbpress
     50    # clone the BuddyPress develop repo
     51    - git clone --depth=1 git://buddypress.git.wordpress.org/ $WP_DEVELOP_DIR/src/wp-content/plugins/buddypress
     52    - plugin_slug=$(basename $(pwd))
     53    - plugin_dir=$WP_DEVELOP_DIR/src/wp-content/plugins/$plugin_slug
     54    - cd ..
     55    - mv $plugin_slug $plugin_dir
     56    # set up tests config
    4957    - cd $WP_DEVELOP_DIR
    50     # setub db
    51     - mysql -e "CREATE DATABASE wordpress_test;" -uroot
    52     # setub wp-config
     58    - echo $WP_DEVELOP_DIR
    5359    - cp wp-tests-config-sample.php wp-tests-config.php
    5460    - sed -i "s/youremptytestdbnamehere/wordpress_test/" wp-tests-config.php
    5561    - sed -i "s/yourusernamehere/root/" wp-tests-config.php
    5662    - sed -i "s/yourpasswordhere//" wp-tests-config.php
    57     - 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;
    58     # prepare for running bbPress' tests
    59     - BBP_DEVELOP_DIR=$WP_DEVELOP_DIR/src/wp-content/plugins/bbpress
    60     - cd $BBP_DEVELOP_DIR
     63    # disable WP_DEBUG for PHP >= 5.5 due to ext/mysqli E_DEPRECATED errors
     64    - if [[ "$TRAVIS_PHP_VERSION" > 5.4* ]] && [[ "$WP_VERSION" == "3.7" ]] ; then sed -i "s:define( 'WP_DEBUG://define( 'WP_DEBUG:" wp-tests-config.php; fi;
     65    # set up database
     66    - mysql -e 'CREATE DATABASE wordpress_test;' -uroot
     67    # prepare for running the tests
     68    - cd $plugin_dir
    6169    - npm install -g grunt-cli
    6270
    63 # Before script, failures in this section will result in build status 'failed'
     71# before_script: Failures in this section will result in build status 'failed'
    6472before_script:
    6573  - npm install
    6674  - grunt build
    6775
    68 script: grunt travis
     76# Run tests
     77script:
     78  - grunt travis
    6979
    7080notifications:
Note: See TracChangeset for help on using the changeset viewer.