Make WordPress Core


Ignore:
Timestamp:
02/21/2020 01:05:39 PM (4 years ago)
Author:
SergeyBiryukov
Message:

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

Among other fixes, this backports [26871], [26909-26910], [26940], [27086], [27168], [28799], [28873], [28943], [28961], [28964], [28966-28967], [29120], [29251], [29503], [29860], [29869], [29954], [30001], [30160], [30282], [30285], [30289-30291], [30513-30514], [30516-30521], [30524], [30526], [30529-30530], [31253-31254], [31257-31259], [31622], [40241], [40255], [40257], [40259], [40269], [40271], [40446], [40449], [40457], [40604], [40538], [40833], [41082], [41303], [41306], [44993].

See #49485.

Location:
branches/3.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.8

  • branches/3.8/.travis.yml

    r40625 r47338  
     1# Travis CI Configuration File
     2sudo: false
     3dist: trusty
    14language: php
     5cache:
     6  directories:
     7    - $HOME/.npm
     8    - vendor
     9    - $HOME/.composer/cache
    210
    3 php:
    4     - "5.5"
    5     - "5.2"
     11# Build matrix options
     12matrix:
     13  include:
     14    - php: 5.5
     15      env: WP_TRAVISCI=travis:js
     16    - php: 5.5
     17      env: WP_TRAVISCI=travis:phpunit
     18    - php: 5.2
     19      env: WP_TRAVISCI=travis:phpunit
     20      dist: precise
     21  fast_finish: true
    622
     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'
    737before_script:
    8     - |
    9       stable='^[0-9\.]+$';
    10       if [[ "$TRAVIS_PHP_VERSION" =~ $stable ]]; then
    11           phpenv config-rm xdebug.ini
    12       fi
    13     - mysql -e "CREATE DATABASE wordpress_tests;" -uroot
    14     - cp wp-tests-config-sample.php wp-tests-config.php
    15     - sed -i "s/youremptytestdbnamehere/wordpress_tests/" wp-tests-config.php
    16     - sed -i "s/yourusernamehere/travis/" wp-tests-config.php
    17     - sed -i "s/yourpasswordhere//" wp-tests-config.php
    18     - svn checkout https://plugins.svn.wordpress.org/wordpress-importer/trunk tests/phpunit/data/plugins/wordpress-importer
    19     - npm install -g grunt-cli
    20     - npm install
    21     - php --version
    22 
    23 script: grunt test
     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
    2489notifications:
    2590  slack:
     
    2994    on_failure: always
    3095    on_success: change
    31     on_pull_requests: false
Note: See TracChangeset for help on using the changeset viewer.