Make WordPress Core


Ignore:
Timestamp:
02/20/2020 05:04:42 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Build/Test Tools: Fix the Travis CI build for the 3.9 branch.

Among other fixes, this backports [28943], [28961], [28964-28968], [28988], [29120], [29251], [29503], [29860], [29869], [29954], [30001], [30160], [30282], [30285], [30289-30291], [30513-30514], [30516-30521], [30523-30524], [30526], [30529-30530], [31253-31254], [31257-31259], [31622], [33374], [40255], [40257], [40259], [40269], [40271], [40446], [40449], [40457], [40604], [40538], [40833], [41082], [41303], [41306], [44993].

See #49485.

Location:
branches/3.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.9

  • branches/3.9/.travis.yml

    r41084 r47329  
     1# Travis CI Configuration File
     2sudo: false
    13dist: trusty
    24language: php
     5cache:
     6  directories:
     7    - $HOME/.npm
     8    - vendor
     9    - $HOME/.composer/cache
    310
    411# Build matrix options
     
    613  include:
    714    - php: 5.5
     15      env: WP_TRAVISCI=travis:js
     16    - php: 5.5
     17      env: WP_TRAVISCI=travis:phpunit
    818    - php: 5.2
     19      env: WP_TRAVISCI=travis:phpunit
    920      dist: precise
     21  fast_finish: true
    1022
     23# Before install, failures in this section will result in build status 'errored'
     24before_install:
     25  - WP_CORE_DIR=/tmp/wordpress/
     26  - >
     27    if [[ "$WP_TRAVISCI" == "travis:phpunit" ]]; then
     28        mysql -e "CREATE DATABASE wordpress_tests;" -uroot
     29        cp wp-tests-config-sample.php wp-tests-config.php
     30        sed -i "s/youremptytestdbnamehere/wordpress_tests/" wp-tests-config.php
     31        sed -i "s/yourusernamehere/travis/" wp-tests-config.php
     32        sed -i "s/yourpasswordhere//" wp-tests-config.php
     33        svn checkout https://plugins.svn.wordpress.org/wordpress-importer/trunk tests/phpunit/data/plugins/wordpress-importer
     34    fi
     35
     36# Before script, failures in this section will result in build status 'failed'
    1137before_script:
    12     - |
    13       stable='^[0-9\.]+$';
    14       if [[ "$TRAVIS_PHP_VERSION" =~ $stable ]]; then
    15           phpenv config-rm xdebug.ini
    16       fi
    17     - mysql -e "CREATE DATABASE wordpress_tests;" -uroot
    18     - cp wp-tests-config-sample.php wp-tests-config.php
    19     - sed -i "s/youremptytestdbnamehere/wordpress_tests/" wp-tests-config.php
    20     - sed -i "s/yourusernamehere/travis/" wp-tests-config.php
    21     - sed -i "s/yourpasswordhere//" wp-tests-config.php
    22     - svn checkout https://plugins.svn.wordpress.org/wordpress-importer/trunk tests/phpunit/data/plugins/wordpress-importer
    23     - npm install -g grunt-cli
    24     - npm install
    25     - php --version
    26 
    27 script: grunt travis
     38- |
     39  # Remove Xdebug for a huge performance increase, but not from nightly:
     40  stable='^[0-9\.]+$'
     41  if [[ "$TRAVIS_PHP_VERSION" =~ $stable ]]; then
     42    phpenv config-rm xdebug.ini
     43  fi
     44- |
     45  # Export Composer's global bin dir to PATH, but not on PHP 5.2:
     46  if [[ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]]; then
     47    composer config --list --global
     48    export PATH=`composer config --list --global | grep '\[home\]' | { read a; echo "${a#* }/vendor/bin:$PATH"; }`
     49  fi
     50- |
     51  # Install the specified version of PHPUnit depending on the PHP version:
     52  if [[ "$WP_TRAVISCI" == "travis:phpunit" ]]; then
     53    case "$TRAVIS_PHP_VERSION" in
     54      7.1|7.0|nightly)
     55        echo "Using PHPUnit 5.x"
     56        composer global require "phpunit/phpunit:^5"
     57        ;;
     58      5.6|5.5|5.4|5.3)
     59        echo "Using PHPUnit 4.x"
     60        composer global require "phpunit/phpunit:^4"
     61        ;;
     62      5.2)
     63        # Do nothing, use default PHPUnit 3.6.x
     64        echo "Using default PHPUnit, hopefully 3.6"
     65        ;;
     66      *)
     67        echo "No PHPUnit version handling for PHP version $TRAVIS_PHP_VERSION"
     68        exit 1
     69        ;;
     70    esac
     71  fi
     72- npm --version
     73- node --version
     74- nvm install 0.10.48
     75- npm install -g grunt-cli
     76- npm install
     77- npm prune
     78- php --version
     79- php -m
     80- npm --version
     81- node --version
     82- which phpunit
     83- phpunit --version
     84- curl --version
     85- grunt --version
     86- git --version
     87- svn --version
     88script: grunt $WP_TRAVISCI
    2889notifications:
    2990  slack:
     
    3394    on_failure: always
    3495    on_success: change
    35     on_pull_requests: false
Note: See TracChangeset for help on using the changeset viewer.