forked from yiisoft/yii2-gii
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
44 lines (35 loc) · 955 Bytes
/
.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
dist: trusty
language: php
php:
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
sudo: false
# cache vendor dirs
cache:
directories:
- $HOME/.composer/cache
install:
- travis_retry composer self-update && composer --version
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- travis_retry composer install --prefer-dist --no-interaction
before_script:
- psql --version
- psql -U postgres -c 'CREATE DATABASE yiitest;';
- psql -U postgres yiitest < tests/data/pgsql.sql
- echo "<?php unset(\$config['databases']['pgsql']['fixture']);" > tests/data/config.local.php
- |
if [ $TRAVIS_PHP_VERSION = '5.6' ]; then
PHPUNIT_FLAGS="--coverage-clover=coverage.clover"
fi
script:
- ./vendor/bin/phpunit $PHPUNIT_FLAGS
after_script:
- |
if [ $TRAVIS_PHP_VERSION = '5.6' ]; then
travis_retry wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
fi