.travis.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. - dist: precise
  24. php: 5.3
  25. fast_finish: true
  26. allow_failures:
  27. - php: nightly
  28. before_install:
  29. # determine INI file
  30. - if [[ $TRAVIS_PHP_VERSION = hhvm* ]]; then export INI=/etc/hhvm/php.ini; else export INI=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi
  31. # disable xdebug if available
  32. - phpenv config-rm xdebug.ini || echo "xdebug not available"
  33. # disable default memory limit
  34. - echo memory_limit = -1 >> $INI
  35. install:
  36. # flags to pass to install
  37. - flags="--ansi --prefer-dist --no-interaction --optimize-autoloader --no-suggest --no-progress"
  38. # install dependencies using system provided composer binary
  39. - composer install $flags
  40. # install dependencies using composer from source
  41. - bin/composer install $flags
  42. before_script:
  43. # make sure git tests do not complain about user/email not being set
  44. - git config --global user.name travis-ci
  45. - git config --global user.email travis@example.com
  46. script:
  47. # run test suite directories in parallel using GNU parallel
  48. - 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);'
  49. before_deploy:
  50. - php -d phar.readonly=0 bin/compile
  51. deploy:
  52. provider: releases
  53. api_key: $GITHUB_TOKEN
  54. file: composer.phar
  55. skip_cleanup: true
  56. on:
  57. tags: true
  58. repo: composer/composer
  59. php: '7.1'