Skip to:
Content

bbPress.org

Ticket #2542: 2542.travis.yml.2.diff

File 2542.travis.yml.2.diff, 3.8 KB (added by netweb, 7 years ago)
  • .travis.yml

     
     1# Travis CI Configuration File
     2
     3# Tell Travis CI we're using PHP
    14language: php
    25
     6# PHP versions to test.
    37php:
    48    - 5.2
    59    - 5.3
     
    610    - 5.4
    711    - 5.5
    812
     13# WordPress versions to test.
    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
     16    - WP_VERSION=3.9.0
     17    - WP_VERSION=3.8.3
     18    - WP_VERSION=3.7.3
    2019
     20# Build matrix custom includes, excludes and allowed failures
     21
     22matrix:
     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
    2132before_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
    3542    - 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
     43    - sed -i "s:dirname( __FILE__ ) . '/wordpress/':'$WP_DEVELOP_DIR':" 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    # 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
    4454
    45 script: phpunit
     55script: grunt travis
    4656
    4757notifications:
    4858    email: false
     
    5161        channels:
    5262            - "irc.freenode.net#bbpress-dev"
    5363        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}"
  • Gruntfile.js

     
    330330                        opts: { stdio: 'inherit' }
    331331                }, this.async() );
    332332        });
    333 
    334333        grunt.registerTask( 'jstest', 'Runs all javascript tasks.', [ 'jsvalidate', 'jshint' ] );
     334        grunt.registerTask( 'travis', ['jshint', 'test'] );
    335335
    336336        // Patch task.
    337337        grunt.renameTask('patch_wordpress', 'patch');