From 001f64f18cb01e96f7821ff6abe5ee2e6f3e45e5 Mon Sep 17 00:00:00 2001 From: ADmad Date: Sun, 23 Oct 2016 00:56:19 +0530 Subject: [PATCH] Update travis config. --- .travis.yml | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index ca1b4ec..6fa33f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,37 @@ language: php +sudo: false + +dist: trusty + php: - '7.0' + - '7.1' + +env: + global: + - DEFAULT=1 + +matrix: + fast_finish: true + + include: + - php: '7.0' + env: PHPCS=1 DEFAULT=0 cache: directories: - vendor install: - - composer install + - composer install --prefer-dist script: - - vendor/bin/phpunit --coverage-clover=coverage.xml + - if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION == 7.0 ]]; then vendor/bin/phpunit --coverage-clover=coverage.xml; fi + + - if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION != 7.0 ]]; then vendor/bin/phpunit; fi + + - if [[ $PHPCS = 1 ]]; then vendor/bin/phpcs -p --extensions=php --standard=PSR2 ./src ./tests; fi after_success: - - bash <(curl -s https://codecov.io/bash) + - if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION = 7.0 ]]; then bash <(curl -s https://codecov.io/bash); fi