.travis.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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.3
  16. env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak_vendors"
  17. - php: 7.1
  18. - php: 7.2
  19. - php: 7.3
  20. env: COVERAGE=true PHPUNIT_FLAGS="-v --coverage-text"
  21. # Latest commit to master
  22. - php: 7.3
  23. env: STABILITY="dev"
  24. allow_failures:
  25. # Dev-master is allowed to fail.
  26. - env: STABILITY="dev"
  27. before_install:
  28. - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi
  29. - if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi;
  30. - if ! [ -v "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi;
  31. install:
  32. # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355
  33. - if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi
  34. - composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction
  35. - ./vendor/bin/simple-phpunit install
  36. script:
  37. - composer validate --strict --no-check-lock
  38. # simple-phpunit is the PHPUnit wrapper provided by the PHPUnit Bridge component and
  39. # it helps with testing legacy code and deprecations (composer require symfony/phpunit-bridge)
  40. - ./vendor/bin/simple-phpunit $PHPUNIT_FLAGS