.travis.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. language: php
  2. dist: trusty
  3. git:
  4. depth: 5
  5. cache:
  6. directories:
  7. - $HOME/.composer/cache
  8. addons:
  9. apt:
  10. packages:
  11. - parallel
  12. matrix:
  13. include:
  14. - php: 5.3
  15. dist: precise
  16. - php: 5.4
  17. - php: 5.5
  18. - php: 5.6
  19. - php: 7.0
  20. - php: 7.1
  21. - php: 7.2
  22. - php: 7.3
  23. - php: 7.4
  24. env:
  25. - deps=high
  26. - SYMFONY_PHPUNIT_VERSION=7.5
  27. - php: 7.4
  28. env:
  29. - deps=high
  30. - PHPSTAN=1
  31. - SYMFONY_PHPUNIT_VERSION=7.5
  32. - php: nightly
  33. fast_finish: true
  34. allow_failures:
  35. - php: nightly
  36. before_install:
  37. # disable Xdebug if available
  38. - phpenv config-rm xdebug.ini || echo "xdebug not available"
  39. # disable default memory limit
  40. - export INI=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
  41. - echo memory_limit = -1 >> $INI
  42. - composer validate
  43. install:
  44. # flags to pass to install
  45. - flags="--ansi --prefer-dist --no-interaction --optimize-autoloader --no-suggest --no-progress"
  46. # update deps to latest in case of high deps build
  47. - if [ "$deps" == "high" ]; then composer config platform.php 7.4.0; composer update $flags; fi
  48. # install dependencies using system provided composer binary
  49. - composer install $flags
  50. # install dependencies using composer from source
  51. - bin/composer install $flags
  52. before_script:
  53. # make sure git tests do not complain about user/email not being set
  54. - git config --global user.name travis-ci
  55. - git config --global user.email travis@example.com
  56. script:
  57. - if [[ $PHPSTAN == "1" ]]; then
  58. bin/composer require --dev phpstan/phpstan:^0.12 phpunit/phpunit:^7.5 --no-update &&
  59. bin/composer update phpstan/* phpunit/* sebastian/* --with-dependencies &&
  60. vendor/bin/phpstan analyse --configuration=phpstan/config.neon;
  61. else
  62. vendor/bin/simple-phpunit;
  63. fi
  64. before_deploy:
  65. - php -d phar.readonly=0 bin/compile
  66. deploy:
  67. provider: releases
  68. api_key: $GITHUB_TOKEN
  69. file: composer.phar
  70. skip_cleanup: true
  71. on:
  72. tags: true
  73. repo: composer/composer
  74. php: '7.3'