-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
117 lines (101 loc) · 3.33 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
language: php
dist: precise
php:
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- nightly
env:
- FB=2.1
- FB=2.5
# run build against hhvm but allow them to fail
# http://docs.travis-ci.com/user/build-configuration/#Rows-That-are-Allowed-To-Fail
matrix:
fast_finish: true
include:
- php: 7.0
env: FB=3.0
dist: trusty
- php: 7.1
env: FB=3.0
dist: trusty
- php: 7.2
env: FB=3.0
dist: trusty
- php: nightly
env: FB=3.0
dist: trusty
- php: 7.0
env: FB=master
dist: trusty
- php: 7.1
env: FB=master
dist: trusty
- php: 7.2
env: FB=master
dist: trusty
- php: nightly
env: FB=master
dist: trusty
allow_failures:
- php: 7.2
- php: nightly
- env: FB=3.0
- env: FB=master
# faster builds on new travis setup not using sudo
sudo: true
# cache composer dirs
cache:
directories:
- vendor
- $HOME/.composer/cache
before_install:
- sudo sh -c "echo 'precedence ::ffff:0:0/96 100' >> /etc/gai.conf"
- sudo apt-get update -qq
#installing and starting Firebird Server
- sudo chmod +x tests/ci/travis/*.sh
- sudo bash -e -x tests/ci/travis/setup_firebird_${FB}.sh
- export PATH=$PATH:/usr/local/firebird/bin:/opt/firebird/bin
# initialize databases
- echo "CREATE DATABASE 'localhost:/tmp/TEST.FDB' USER 'SYSDBA' PASSWORD 'masterkey' PAGE_SIZE 16384 DEFAULT CHARACTER SET UTF8;" > /tmp/create_test.sql
- isql-fb -i /tmp/create_test.sql
- cat /tmp/create_test.sql
#build pdo_firebird
- export BRANCH=PHP-$(phpenv version-name)
- if [[ $(phpenv version-name) == "nightly" ]]; then export BRANCH=master; fi
- travis_retry git clone --depth=1 -b ${BRANCH} --single-branch https://github.com/php/php-src.git
- (cd php-src/ext/pdo_firebird/; phpize && ./configure && make && sudo make install)
install:
- |
if [ $TRAVIS_PHP_VERSION = '7.0' ] && [ $FB = '2.5' ]; then
# disable xdebug for performance reasons when code coverage is not needed. note: xdebug on hhvm is disabled by default
phpenv config-rm xdebug.ini || echo "xdebug is not installed"
fi
#enabling pdo_firebird
- echo "extension=pdo_firebird.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- php -m | grep -i pdo
#preparing Yii2 environment
- travis_retry composer self-update && composer --version
- travis_retry composer global require "fxp/composer-asset-plugin:~1.2.2" --prefer-dist --no-interaction
- export PATH="$HOME/.composer/vendor/bin:$PATH"
#installing composer dependency
- travis_retry composer install --prefer-dist --no-interaction
#For timeout tests
- travis_retry composer require "phpunit/php-invoker" --dev --prefer-dist --no-interaction
before_script:
# show some versions and env information
- isql-fb -z -q -i /dev/null
- |
if [ $TRAVIS_PHP_VERSION = '7.0' ] && [ $FB = '2.5' ]; then
PHPUNIT_FLAGS="--coverage-clover=coverage.clover"
fi
script:
- vendor/bin/phpunit --verbose $PHPUNIT_FLAGS --enforce-time-limit
after_script:
- |
if [ $TRAVIS_PHP_VERSION = '7.0' ] && [ $FB = '2.5' ]; then
travis_retry wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
fi