Skip to content
This repository has been archived by the owner on Feb 28, 2020. It is now read-only.

Commit

Permalink
Update tests config
Browse files Browse the repository at this point in the history
  • Loading branch information
emodric committed Oct 4, 2019
1 parent c81be98 commit 10e04fb
Showing 1 changed file with 33 additions and 28 deletions.
61 changes: 33 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,47 @@
dist: trusty
dist: xenial

language: php

php:
- 7.0
- 7.1

cache:
directories:
- vendor
directories:
- $HOME/.cache/composer

env:
- PHPUNIT_CONFIG="phpunit.xml.dist"

matrix:
# mark as finished before allow_failures are run
fast_finish: true
include:
- php: 5.6
- php: 7.0
- php: 7.1

# test only master (+ pull requests)
include:
- php: 7.1
env: RUN_COVERAGE="yes"

branches:
only:
- master

# install dependencies
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

# execute phpunit as the script command
script:
- ./vendor/bin/phpunit -d memory_limit=-1 --colors -c phpunit.xml.dist --coverage-clover=coverage.xml
# Read-only OAuth token to work around GitHub API rate limits
- composer config -g github-oauth.github.com "4b3b0a83ea27d9544d3608a384c7a14625a98804"

# disable mail notifications
notification:
- composer update --no-suggest --prefer-dist

script:
- 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 "Codecov did not collect coverage reports"
fi
notifications:
email: false

# reduce depth (history) of git checkout
git:
depth: 30

# we don't need sudo
sudo: false

# send coverage to codecov.io
after_success:
- bash <(curl -s https://codecov.io/bash)
depth: 1

0 comments on commit 10e04fb

Please sign in to comment.