.travis.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. language: php
  2. sudo: false
  3. dist: trusty
  4. git:
  5. depth: 5
  6. cache:
  7. directories:
  8. - $HOME/.composer/cache
  9. addons:
  10. apt:
  11. packages:
  12. - parallel
  13. php:
  14. - 5.4
  15. - 5.5
  16. - 5.6
  17. - 7.0
  18. - 7.1
  19. - 7.2
  20. - nightly
  21. matrix:
  22. include:
  23. - php: 5.3
  24. dist: precise
  25. - php: 7.2
  26. env: deps=high
  27. fast_finish: true
  28. allow_failures:
  29. - php: nightly
  30. before_install:
  31. # disable xdebug if available
  32. - phpenv config-rm xdebug.ini || echo "xdebug not available"
  33. # disable default memory limit
  34. - export INI=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
  35. - echo memory_limit = -1 >> $INI
  36. install:
  37. # flags to pass to install
  38. - flags="--ansi --prefer-dist --no-interaction --optimize-autoloader --no-suggest --no-progress"
  39. # update deps to latest in case of high deps build
  40. - if [ "$deps" == "high" ]; then composer config platform.php 7.2.4; composer update $flags; fi
  41. # install dependencies using system provided composer binary
  42. - composer install $flags
  43. # install dependencies using composer from source
  44. - bin/composer install $flags
  45. before_script:
  46. # make sure git tests do not complain about user/email not being set
  47. - git config --global user.name travis-ci
  48. - git config --global user.email travis@example.com
  49. script:
  50. # run test suite directories in parallel using GNU parallel
  51. - ls -d tests/Composer/Test/* | parallel --gnu --keep-order 'echo "Running {} tests"; ./vendor/bin/phpunit -c tests/complete.phpunit.xml --colors=always {} || (echo -e "\e[41mFAILED\e[0m {}" && exit 1);'
  52. before_deploy:
  53. - php -d phar.readonly=0 bin/compile
  54. deploy:
  55. provider: releases
  56. api_key: $GITHUB_TOKEN
  57. file: composer.phar
  58. skip_cleanup: true
  59. on:
  60. tags: true
  61. repo: composer/composer
  62. php: '7.1'