Skip to content

Commit

Permalink
Update TravisCI config
Browse files Browse the repository at this point in the history
  • Loading branch information
srmklive committed May 11, 2017
1 parent e2b2901 commit 15b50fa
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,37 @@
language: php

sudo: false

php:
- 5.6
- 7.0
- 7.1

env:
matrix:
- COMPOSER_FLAGS="--prefer-lowest"
- COMPOSER_FLAGS=""
global:
- setup=stable
- coverage=no

before_script:
- travis_retry composer self-update
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source
- composer config discard-changes true
- if [[ $setup = 'stable' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-stable; fi
- if [[ $setup = 'coveralls' ]]; then travis_retry composer require "satooshi/php-coveralls=~0.7" --prefer-dist --no-interaction --dev; fi

script:
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
- if [[ $coverage = 'yes' ]]; then ./vendor/bin/phpunit --coverage-clover build/logs/clover.xml; fi
- if [[ $coverage = 'no' ]]; then ./vendor/bin/phpunit; fi

after_script:
- php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover
- if [[ $setup = 'coveralls' ]]; then php vendor/bin/coveralls -v; fi

matrix:
include:
- php: 5.6
env: setup=coveralls coverage=yes
- php: 7.0
env: setup=coveralls coverage=yes
- php: 7.1
env: setup=coveralls coverage=yes
allow_failures:
- env: setup=coveralls coverage=yes
fast_finish: true

0 comments on commit 15b50fa

Please sign in to comment.