.travis.yml
language: php
php:
- '7.2'
- '7.3'
cache:
directories:
- $HOME/.composer/cache
addons:
#postgresql: "9.3"
#https://docs.travis-ci.com/user/database-setup/#using-a-different-postgresql-version
postgresql: "10"
apt:
packages:
- postgresql-10
- postgresql-client-10
env:
global:
- PGPORT=5433
- PGUSER=travis
- PGHOST=""
sudo: required
services:
- mysql
- postgresql
before_script:
- composer self-update
- composer install --no-ansi
- mysql -e 'CREATE DATABASE dsql_test;'
- mysql -e 'SET GLOBAL max_connections = 1000;'
#- echo "Copying Postgres 9.x config to Postgres 10 and Restarting Postgres 10"
#- sudo cp /etc/postgresql/{9.6,10}/main/pg_hba.conf
#- sudo service postgresql restart
#- psql -U travis -c 'CREATE DATABASE "atk4-dsql-test";'
#- psql -U travis -c 'ALTER ROLE travis CONNECTION LIMIT -1;'
- mkdir -p build/logs
script:
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.2" ]]; then CM=""; NC=""; else CM=""; NC="--no-coverage"; fi
- $CM ./vendor/bin/phpunit --configuration phpunit.xml $NC
- $CM ./vendor/bin/phpunit --configuration phpunit-mysql.xml $NC
#- $CM ./vendor/bin/phpunit --configuration phpunit-pgsql.xml $NC
after_script:
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.2" ]]; then
echo "Merging coverage reports:";
vendor/bin/phpcov merge build/logs/ --clover build/logs/cc.xml;
echo "We now have these coverage files:";
ls -l build/logs;
echo "Sending codeclimate report:";
vendor/bin/test-reporter --coverage-report build/logs/cc.xml;
echo "Sending codecov report:";
TRAVIS_CMD="" bash <(curl -s https://codecov.io/bash) -f build/logs/cc.xml;
fi
notifications:
slack:
rooms:
- agiletoolkit:bjrKuPBf1h4cYiNxPBQ1kF6c#dsql
on_success: change
urls:
- https://webhooks.gitter.im/e/b33a2db0c636f34bafa9
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always
email: false