From 90e7164fdcf197e98287cfb8e88732e0f55d44c9 Mon Sep 17 00:00:00 2001 From: Romain Date: Tue, 7 Jun 2022 12:12:13 +0200 Subject: [PATCH] add php 8 in travis config + bump 7.3 to 7.4 --- .travis.yml | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..410d4d0 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,59 @@ +language: php + +cache: + directories: + - $HOME/.composer/cache/files + +branches: + except: + - /^analysis-.*$/ + +env: + global: + - TEST_COMMAND="composer test" + +matrix: + fast_finish: true + include: + # Minimum supported Symfony version and latest PHP version + - php: 7.4 + env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak" + + # Test the latest stable release + - php: 7.1 + - php: 7.2 + - php: 7.3 + - php: 8.0 + - php: 8.1 + + # Test LTS versions + - php: 7.4 + env: DEPENDENCIES="dunglas/symfony-lock:^3" + - php: 7.4 + env: DEPENDENCIES="dunglas/symfony-lock:^4" + + # Latest commit to master + - php: 7.4 + env: STABILITY="dev" + + allow_failures: + # dev stability is allowed to fail. + - env: STABILITY="dev" + +before_install: + - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi + - if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi; + - if ! [ -v "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi; + +install: + # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355 + - if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi + - COMPOSER_MEMORY_LIMIT=-1 composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction + +script: + - composer validate --strict --no-check-lock + - $TEST_COMMAND + +after_success: + - if [[ $COVERAGE = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi + - if [[ $COVERAGE = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi