You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

81 lines
1.9 KiB

language: php
php:
- '7.1'
- '7.2'
- nightly
branches:
only:
- master
env:
global:
- OCULAR_BIN=$HOME/.bin/ocular.phar
- PHPUNIT_BIN='vendor/bin/phpunit'
- PHPUNIT_CONFIG='phpunit.xml.dist'
- PHPUNIT_FLAGS='--stop-on-failure --verbose'
cache:
directories:
- $HOME/.composer/cache/files
- $HOME/.bin/
services:
- mysql
matrix:
fast_finish: true
include:
- php: '7.1'
env:
- COMPOSER_FLAGS="--prefer-lowest"
- COVERAGE="true"
- PHPUNIT_FLAGS="--stop-on-failure --verbose --coverage-text --coverage-clover=coverage.xml"
- SYMFONY_VERSION="~3.3.10"
- php: '7.2'
env: SYMFONY_VERSION='~3.4.0'
- php: '7.2'
env: SYMFONY_VERSION='~4.0.0'
- php: '7.2'
env: SYMFONY_VERSION='[email protected]'
allow_failures:
- php: nightly
- env: SYMFONY_VERSION='[email protected]'
before_install:
- set -eo pipefail
- echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- phpenv config-rm xdebug.ini || true
- |
if [ "$SYMFONY_VERSION" != "" ]; then
composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update
fi
- |
if [ -n "$COVERAGE" ]; then
PHPUNIT_FLAGS="$PHPUNIT_FLAGS --testdox --coverage-text"
PHPUNIT_BIN="phpdbg -qrr $PHPUNIT_BIN"
if [ ! -e $OCULAR_BIN ]; then
wget https://scrutinizer-ci.com/ocular.phar -O $OCULAR_BIN
chmod +x $OCULAR_BIN
alias ocular="php $OCULAR_BIN"
fi
else
PHPUNIT_BIN="php -d zend.enable_gc=0 $PHPUNIT_BIN"
fi
- mysql -u root -e 'create database hautelook_alice_bundle;'
install:
- composer update --prefer-dist $COMPOSER_FLAGS
script: $PHPUNIT_BIN -c $PHPUNIT_CONFIG $PHPUNIT_FLAGS
after_script:
- |
if [ -n "$COVERAGE" ]; then
$OCULAR_BIN code-coverage:upload --format=php-clover coverage.xml
fi
notifications:
email: false