.travis.yml
language: php
sudo: false
dist: xenial
os: linux
services:
- mysql
env:
global:
- SYMFONY_DEPRECATIONS_HELPER=weak
- DATABASE_URL=mysql://root:@127.0.0.1:3306/unite_test
jobs:
include:
- php: 7.2
if: type != push OR branch != master OR fork != false
env:
- COVERAGE = false
- php: 7.3
if: type != push OR branch != master OR fork != false
env:
- COVERAGE = false
- php: 7.3
if: type == push AND branch == master AND fork == false
env:
- COVERAGE = true
before_install:
- |
if [[ COVERAGE ]]; then
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
else
phpenv config-rm xdebug.ini
fi
- mysql -e 'CREATE DATABASE unite_test;'
install:
- composer install
script:
- |
if [[ COVERAGE ]]; then
php ./bin/phpunit --coverage-clover clover.xml
else
php ./bin/phpunit
fi
after_script:
- |
if [[ COVERAGE ]]; then
./cc-test-reporter after-build -t clover --exit-code $TRAVIS_TEST_RESULT
fi