.travis.yml 1.9 KB

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