Changeset 45745 for trunk/.travis.yml
- Timestamp:
- 08/05/2019 07:09:14 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.travis.yml
r45607 r45745 1 sudo: false2 dist: trusty3 1 language: php 2 services: 3 - docker 4 - mysql 5 6 addons: 7 apt: 8 packages: 9 - docker-ce 10 4 11 cache: 5 12 apt: true … … 8 15 - vendor 9 16 - $HOME/.composer/cache 17 10 18 env: 11 19 global: 12 - WP_TRAVISCI=travis:phpunit 20 - LOCAL_DIR=build 21 13 22 matrix: 14 23 include: 15 - php: 7.2 16 env: WP_TRAVISCI=e2e 17 - php: 7.2 18 env: WP_TRAVISCI=travis:phpcs 19 - php: 7.1 20 env: WP_TRAVISCI=travis:js 24 - env: WP_TRAVISCI=test:e2e 25 - env: WP_TRAVISCI=travis:phpcs 26 - env: WP_TRAVISCI=travis:js 27 - env: LOCAL_PHP=7.3-fpm WP_TRAVISCI=test:php 28 - php: 7.3 29 dist: trusty 30 env: WP_TRAVIS_OBJECT_CACHE=true WP_TRAVISCI=travis:phpunit 31 services: memcached 32 - env: LOCAL_PHP=7.2-fpm WP_TRAVISCI=test:php 33 - env: LOCAL_PHP=7.1-fpm WP_TRAVISCI=test:php 34 - env: LOCAL_PHP=7.0-fpm WP_TEST_REPORTER=true WP_TRAVISCI=test:php 35 - env: LOCAL_PHP=5.6-fpm WP_TRAVISCI=test:php 21 36 - php: 7.4snapshot 22 - php: 7.3 23 - php: 7.3 24 env: WP_TRAVIS_OBJECT_CACHE=true 25 services: memcached 26 - php: 7.2 27 - php: 7.1 28 - php: 7.0 29 env: WP_TEST_REPORTER=true 30 - php: 5.6 37 dist: trusty 38 env: WP_TRAVISCI=travis:phpunit 31 39 - php: nightly 40 dist: trusty 41 env: WP_TRAVISCI=travis:phpunit 32 42 allow_failures: 33 43 - php: 7.4snapshot 34 44 - php: nightly 35 45 fast_finish: true 46 36 47 before_install: 37 48 - | … … 45 56 fi 46 57 - | 58 if [[ "$WP_TRAVISCI" == "test:php" ]]; then 59 cp wp-tests-config-sample.php wp-tests-config.php 60 sed -i "s/youremptytestdbnamehere/wordpress_develop_tests/" wp-tests-config.php 61 sed -i "s/yourusernamehere/root/" wp-tests-config.php 62 sed -i "s/yourpasswordhere/password/" wp-tests-config.php 63 sed -i "s/localhost/mysql/" wp-tests-config.php 64 travis_retry svn checkout https://plugins.svn.wordpress.org/wordpress-importer/tags/0.6.3/ tests/phpunit/data/plugins/wordpress-importer 65 fi 66 - | 67 sudo rm /usr/local/bin/docker-compose 68 curl -L https://github.com/docker/compose/releases/download/1.24.0/docker-compose-`uname -s`-`uname -m` > docker-compose 69 chmod +x docker-compose 70 sudo mv docker-compose /usr/local/bin 71 - | 47 72 if [[ "$WP_TRAVIS_OBJECT_CACHE" == "true" ]]; then 48 73 cp tests/phpunit/includes/object-cache.php src/wp-content/object-cache.php 49 74 echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini 50 75 fi 76 51 77 before_script: 52 78 - | … … 58 84 fi 59 85 - | 60 # Export Composer's global bin dir to PATH , but not on PHP 5.2:86 # Export Composer's global bin dir to PATH: 61 87 composer config --list --global 62 88 export PATH=`composer config --list --global | grep '\[home\]' | { read a; echo "${a#* }/vendor/bin:$PATH"; }` 63 89 - | 64 # Install the specified version of PHPUnit depending on the PHP version:90 # Install PHPUnit for the tests that don't run in Docker. 65 91 if [[ "$WP_TRAVISCI" == "travis:phpunit" ]]; then 66 case "$TRAVIS_PHP_VERSION" in 67 7.4snapshot|7.3|7.2|7.1|nightly) 68 echo "Using PHPUnit 7.x" 69 travis_retry composer global require "phpunit/phpunit:^7" 70 ;; 71 7.0) 72 echo "Using PHPUnit 6.x" 73 travis_retry composer global require "phpunit/phpunit:^6" 74 ;; 75 5.6) 76 echo "Using PHPUnit 4.x" 77 travis_retry composer global require "phpunit/phpunit:^4" 78 ;; 79 *) 80 echo "No PHPUnit version handling for PHP version $TRAVIS_PHP_VERSION" 81 exit 1 82 ;; 83 esac 92 echo "Using PHPUnit 7.x" 93 travis_retry composer global require "phpunit/phpunit:^7" 84 94 fi 85 95 - | … … 94 104 - npm install 95 105 - npm prune 106 - | 107 if [[ "$WP_TRAVISCI" == "test:e2e" ]] || [[ "$WP_TRAVISCI" == "test:php" ]]; then 108 npm run env:start 109 npm run build 110 fi 111 - | 112 if [[ "$WP_TRAVISCI" == "test:e2e" ]]; then 113 npm run env:install 114 fi 96 115 - mysql --version 97 116 - phpenv versions … … 106 125 - svn --version 107 126 - locale -a 127 108 128 script: 109 - | 110 if [[ "$WP_TRAVISCI" == "e2e" ]]; then 111 npm run env:start 112 npm run env:reset-site 113 npm run test:e2e 114 else 115 npm run grunt $WP_TRAVISCI 116 fi 129 - | 130 if [[ "$WP_TRAVISCI" == "test:e2e" ]]; then 131 npm run test:e2e 132 elif [[ "$WP_TRAVISCI" == "test:php" ]]; then 133 npm run test:php -- -- -- --verbose -c phpunit.xml.dist 134 npm run test:php -- -- -- --verbose -c phpunit.xml.dist --group ajax 135 npm run test:php -- -- -- --verbose -c tests/phpunit/multisite.xml 136 npm run test:php -- -- -- --verbose -c tests/phpunit/multisite.xml --group ms-files 137 npm run test:php -- -- -- --verbose -c phpunit.xml.dist --group external-http 138 npm run test:php -- -- -- --verbose -c phpunit.xml.dist --group restapi-jsclient 139 else 140 npm run grunt $WP_TRAVISCI 141 fi 142 117 143 after_script: 118 144 - | … … 123 149 php test-runner/report.php 124 150 fi 151 125 152 notifications: 126 153 slack:
Note: See TracChangeset
for help on using the changeset viewer.