This repository has been archived by the owner on Jan 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
.travis.yml
57 lines (52 loc) · 1.46 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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