Changeset 47329 for branches/3.9/.travis.yml
- Timestamp:
- 02/20/2020 05:04:42 PM (5 years ago)
- 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 2 sudo: false 1 3 dist: trusty 2 4 language: php 5 cache: 6 directories: 7 - $HOME/.npm 8 - vendor 9 - $HOME/.composer/cache 3 10 4 11 # Build matrix options … … 6 13 include: 7 14 - php: 5.5 15 env: WP_TRAVISCI=travis:js 16 - php: 5.5 17 env: WP_TRAVISCI=travis:phpunit 8 18 - php: 5.2 19 env: WP_TRAVISCI=travis:phpunit 9 20 dist: precise 21 fast_finish: true 10 22 23 # Before install, failures in this section will result in build status 'errored' 24 before_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' 11 37 before_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 88 script: grunt $WP_TRAVISCI 28 89 notifications: 29 90 slack: … … 33 94 on_failure: always 34 95 on_success: change 35 on_pull_requests: false
Note: See TracChangeset
for help on using the changeset viewer.