This repository has been archived by the owner on Feb 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |