Permalink
Fetching contributors…
Cannot retrieve contributors at this time
58 lines (52 sloc) 1.46 KB
language: php
sudo: false
php:
- 7.0
- 7.1
- 7.2
- nightly
services:
- memcached
addons:
mariadb: '10.1'
postgresql: "9.6"
env:
matrix:
- DB=MySQLi
- DB=SQLite
- DB=PostgreSQL
matrix:
fast_finish: true
allow_failures:
- php: nightly
before_script:
- |
mysql -u root -e 'CREATE DATABASE IF NOT EXISTS `travis`;'
mysql -u root -e "CREATE USER IF NOT EXISTS 'travis'@'127.0.0.1' IDENTIFIED WITH mysql_native_password;"
mysql -u root -e "GRANT ALL ON travis.* TO 'travis'@'%';"
mysql -u root -e "DROP TABLE IF EXISTS travis.test;"
echo "extension = apcu.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- |
if [[ $TRAVIS_PHP_VERSION != 'nightly' ]]; then
echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
fi
# Only compute code coverage on PHP 7.2
script:
- |
if [[ $TRAVIS_PHP_VERSION != '7.2' ]]; then
export SKIP_COVERAGE=1
fi
- |
php -d variables_order=EGPCS phpt-tests-runner -c tests
after_success:
- |
if [[ $TRAVIS_PHP_VERSION = '7.2' && $DB = 'SQLite' ]]; then
timeout 120 php -d variables_order=EGPCS -d phar.readonly=Off ci/upload_build.php
fi
after_script:
- |
if [[ $TRAVIS_PHP_VERSION = '7.2' ]]; then
php tests/code_coverage_report.php
travis_retry wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover tests/code_coverage_report/clover.xml
fi