.travis.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. - 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. # update deps to latest in case of high deps build
  39. - if [ "$deps" == "high" ]; then composer config platform.php 7.2.4; composer update $flags; fi
  40. # install dependencies using system provided composer binary
  41. - composer install $flags
  42. # install dependencies using composer from source
  43. - bin/composer install $flags
  44. before_script:
  45. # make sure git tests do not complain about user/email not being set
  46. - git config --global user.name travis-ci
  47. - git config --global user.email travis@example.com
  48. script:
  49. # run test suite directories in parallel using GNU parallel
  50. - 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);'
  51. before_deploy:
  52. - php -d phar.readonly=0 bin/compile
  53. deploy:
  54. provider: releases
  55. api_key: $GITHUB_TOKEN
  56. file: composer.phar
  57. skip_cleanup: true
  58. on:
  59. tags: true
  60. repo: composer/composer
  61. php: '7.1'