Skip to:
Content

BuddyPress.org

Changeset 12853


Ignore:
Timestamp:
03/01/2021 08:23:16 PM (5 years ago)
Author:
imath
Message:

Use the PHPUnit Composer dependency to run Travis tests

  • Adds version 5.7 to the WordPress matrix
  • Only run tests about PHP 5.6 with WP 4.9

See #8381

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/.travis.yml

    r12852 r12853  
    2222  - 7.3
    2323  - 7.2
    24   - 5.6
    2524
    2625# WordPress comes from the Git mirror, where 'master' mirrors svn 'trunk' and
     
    2827env:
    2928  - WP_VERSION=master BP_TRAVISCI=travis:phpunit
     29  - WP_VERSION=5.7 BP_TRAVISCI=travis:phpunit
    3030  - WP_VERSION=5.6 BP_TRAVISCI=travis:phpunit
    3131  - WP_VERSION=5.5 BP_TRAVISCI=travis:phpunit
     
    4343    - php: 7.3
    4444      env: WP_VERSION=master BP_TRAVISCI=travis:phpcompat
     45    - php: 5.6
     46      env: WP_VERSION=4.9 BP_TRAVISCI=travis:phpunit
    4547  exclude:
     48    - php: 7.2
     49      env: WP_VERSION=4.9 BP_TRAVISCI=travis:phpunit
    4650    - php: 7.3
    4751      env: WP_VERSION=4.9 BP_TRAVISCI=travis:phpunit
    48     - php: 7.3
    49       env: WP_VERSION=master BP_TRAVISCI=travis:phpunit
    5052
    5153# before_install: Failures in this section will result in build status 'errored'
     
    99101# before_script: Failures in this section will result in build status 'errored'
    100102before_script:
    101   - if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.6" ]]; then composer global require --dev phpunit/phpunit ^5; composer install; fi
    102   - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.2" ]]; then composer global require --dev phpunit/phpunit ^6; composer install; fi
    103   - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.3" ]]; then composer global require --dev phpunit/phpunit ^6; composer install; fi
    104103  - mkdir -p /tmp/node/node_modules
    105104  - ln -s /tmp/node/node_modules $plugin_dir/node_modules
  • trunk/Gruntfile.js

    r12814 r12853  
    324324        phpunit: {
    325325            'default': {
    326                 cmd: 'phpunit',
     326                cmd: './vendor/phpunit/phpunit/phpunit',
    327327                args: ['-c', 'phpunit.xml.dist']
    328328            },
    329329            'multisite': {
    330                 cmd: 'phpunit',
     330                cmd: './vendor/phpunit/phpunit/phpunit',
    331331                args: ['-c', 'tests/phpunit/multisite.xml']
    332332            },
    333333            'codecoverage': {
    334                 cmd: 'phpunit',
     334                cmd: './vendor/phpunit/phpunit/phpunit',
    335335                args: ['-c', 'tests/phpunit/codecoverage.xml' ]
    336336            }
  • trunk/tests/phpunit/includes/define-constants.php

    r12712 r12853  
    2121 *   up the directory tree
    2222 */
    23 if ( false !== getenv( 'WP_PHPUNIT__DIR' ) ) {
     23if ( false !== getenv( 'WP_PHPUNIT__DIR' ) && defined( 'BP_USE_WP_ENV_TESTS' ) ) {
    2424    define( 'WP_TESTS_DIR', getenv( 'WP_PHPUNIT__DIR' ) );
    2525    define( 'WP_ROOT_DIR', '/var/www/html' );
Note: See TracChangeset for help on using the changeset viewer.