| 1 | | language: php |
| 2 | | |
| 3 | | php: |
| 4 | | - 5.2 |
| 5 | | - 5.3 |
| 6 | | - 5.4 |
| 7 | | - 5.5 |
| 8 | | |
| 9 | | 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 |
| 20 | | |
| 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 |
| 35 | | - 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 |
| 38 | | - sed -i "s/yourusernamehere/root/" wp-tests-config.php |
| 39 | | - 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 |
| 44 | | |
| 45 | | script: phpunit |
| 46 | | |
| 47 | | notifications: |
| 48 | | email: false |
| 49 | | |
| 50 | | irc: |
| 51 | | channels: |
| 52 | | - "irc.freenode.net#bbpress-dev" |
| 53 | | template: |
| 54 | | - "Build %{build_number} (%{branch} - %{commit}): %{message} %{build_url}" |
| 55 | | No newline at end of file |
| | 1 | # Travis CI Configuration File |
| | 2 | |
| | 3 | # Tell Travis CI we're using PHP |
| | 4 | language: php |
| | 5 | |
| | 6 | # PHP version used in first build configuration. |
| | 7 | php: |
| | 8 | - 5.2 |
| | 9 | - 5.3 |
| | 10 | - 5.4 |
| | 11 | - 5.5 |
| | 12 | |
| | 13 | # WordPress versions uses Git 'develop' repo branches |
| | 14 | env: |
| | 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 |
| | 19 | |
| | 20 | # Build matrix options |
| | 21 | matrix: |
| | 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' |
| | 33 | before_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 |
| | 43 | - cp wp-tests-config-sample.php wp-tests-config.php |
| | 44 | - sed -i "s/youremptytestdbnamehere/wordpress_test/" wp-tests-config.php |
| | 45 | - sed -i "s/yourusernamehere/root/" wp-tests-config.php |
| | 46 | - sed -i "s/yourpasswordhere//" wp-tests-config.php |
| | 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 |
| | 52 | |
| | 53 | # Before script, failures in this section will result in build status 'failed' |
| | 54 | before_script: |
| | 55 | - npm install |
| | 56 | - grunt build |
| | 57 | |
| | 58 | script: grunt travis |
| | 59 | |
| | 60 | notifications: |
| | 61 | email: false |
| | 62 | irc: |
| | 63 | channels: |
| | 64 | - "irc.freenode.net#bbpress-dev" |
| | 65 | template: |
| | 66 | - "Build %{build_number} (%{branch} - %{commit}): %{message} %{build_url}" |