From ee10d0a1f3f4cdd86d376a621a44fb4b31ab6ae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Bla=C5=BEek?= Date: Sat, 26 Sep 2020 13:11:35 +0200 Subject: [PATCH] Update TravisCI config --- .travis.yml | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5079119..0877fbf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,22 +1,45 @@ +dist: xenial + language: php + php: - 7.2 - 7.3 - 7.4 +cache: + directories: + - $HOME/.cache/composer + +env: + - PHPUNIT_CONFIG="phpunit.xml.dist" + +matrix: + include: + - php: 7.3 + env: RUN_COVERAGE="yes" + branches: only: - master -install: - - composer install +before_script: + - phpenv config-rm xdebug.ini || true + - echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini + - composer update --no-suggest --prefer-dist script: - - composer test + - composer validate --strict + - if [ "$PHPUNIT_CONFIG" != "" ] ; then vendor/bin/phpunit -c $PHPUNIT_CONFIG --colors=always ; fi + - | + if [ "$RUN_COVERAGE" != "" ] ; then + php -dzend_extension=xdebug.so vendor/bin/phpunit --coverage-clover=coverage.xml --colors=always + bash <(curl -s https://codecov.io/bash) || echo "Error while collecting coverage reports" + fi notifications: email: false -after_success: - - cd build/logs && bash <(curl -s https://codecov.io/bash) +git: + depth: 1