.travis.yml
language: php
services:
- redis-server
notifications:
email:
on_failure: change
env:
global:
- COMPOSER_UP="composer update --no-progress --no-suggest --ansi --prefer-dist"
- TEST_COMMAND="./vendor/bin/phpunit"
- COVERAGE=false
matrix:
include:
- php: 7.1.18
env: PREFER="low"
- php: 7.1.18
- php: 7.2
env: COVERAGE=true TEST_FLAGS="--coverage --coverage-xml"
install:
- |
if [[ PREFER = low ]]; then
$COMPOSER_UP --prefer-lowest --prefer-stable
else
$COMPOSER_UP
fi
script:
- composer validate --no-check-lock
- $TEST_COMMAND
cache:
directories:
- $HOME/.composer/cache