.travis.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. language: php
  2. sudo: false
  3. cache:
  4. directories:
  5. - $HOME/.composer/cache/files
  6. - $HOME/symfony-bridge/.phpunit
  7. env:
  8. global:
  9. - PHPUNIT_FLAGS="-v"
  10. - SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit"
  11. matrix:
  12. fast_finish: true
  13. include:
  14. # Minimum supported dependencies with the latest and oldest PHP version
  15. - php: 7.2
  16. env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak_vendors"
  17. - php: 7.1
  18. - php: 7.2
  19. env: COVERAGE=true PHPUNIT_FLAGS="-v --coverage-text"
  20. # Latest commit to master
  21. - php: 7.2
  22. env: STABILITY="dev"
  23. allow_failures:
  24. # Dev-master is allowed to fail.
  25. - env: STABILITY="dev"
  26. before_install:
  27. - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi
  28. - if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi;
  29. - if ! [ -v "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi;
  30. install:
  31. # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355
  32. - if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi
  33. - composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction
  34. - ./vendor/bin/simple-phpunit install
  35. script:
  36. - composer validate --strict --no-check-lock
  37. # simple-phpunit is the PHPUnit wrapper provided by the PHPUnit Bridge component and
  38. # it helps with testing legacy code and deprecations (composer require symfony/phpunit-bridge)
  39. - ./vendor/bin/simple-phpunit $PHPUNIT_FLAGS