forked from yiisoft/yii2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
142 lines (124 loc) · 3.86 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
language: php
php:
- 5.4
- 5.5
- 5.6
<<<<<<< HEAD
- 7.0
=======
>>>>>>> official/master
- hhvm
- hhvm-nightly
env:
- CUBRID_VERSION=9.3.0/CUBRID-9.3.0.0206 CUBRID_PDO_VERSION=9.3.0.0001
# 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
allow_failures:
- php: hhvm-nightly
<<<<<<< HEAD
- php: 7.0
services:
- memcached
=======
services:
- redis-server
- memcached
- elasticsearch
- mongodb
>>>>>>> official/master
# faster builds on new travis setup not using sudo
sudo: false
# cache vendor dirs
cache:
directories:
<<<<<<< HEAD
# - cubrid/9.3.0
=======
# - cubrid # caching cubrid breaks the build on a regular basis and has nearly no speedup
>>>>>>> official/master
- vendor
- $HOME/.composer/cache
# try running against postgres 9.3
addons:
postgresql: "9.3"
install:
- travis_retry composer self-update && composer --version
<<<<<<< HEAD
- travis_retry composer global require "fxp/composer-asset-plugin:~1.0.0"
- export PATH="$HOME/.composer/vendor/bin:$PATH"
# core framework:
- travis_retry composer install --prefer-dist --no-interaction
- tests/data/travis/apc-setup.sh
- tests/data/travis/memcache-setup.sh
# - tests/data/travis/cubrid-setup.sh
before_script:
# show some versions and env information
- php -r "echo INTL_ICU_VERSION . \"\n\";"
- mysql --version
- psql --version
# initialize databases
- mysql -e 'CREATE DATABASE yiitest;';
- psql -U postgres -c 'CREATE DATABASE yiitest;';
- |
if [ $TRAVIS_PHP_VERSION = '5.6' ]; then
PHPUNIT_FLAGS="--coverage-clover=coverage.clover"
fi
script:
- vendor/bin/phpunit --verbose $PHPUNIT_FLAGS --exclude-group mssql,oci,wincache,xcache,zenddata,cubrid
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
=======
- travis_retry composer global require "fxp/composer-asset-plugin:1.0.0-beta4"
- export PATH="$HOME/.composer/vendor/bin:$PATH"
# core framework:
- travis_retry composer install --prefer-dist --no-interaction
- tests/unit/data/travis/mongodb-setup.sh
# TODO: APC currently fails composer. https://github.com/composer/composer/issues/3405
# - tests/unit/data/travis/apc-setup.sh
- tests/unit/data/travis/memcache-setup.sh
- tests/unit/data/travis/cubrid-setup.sh
# print elasticsearch version
- curl http://localhost:9200
# codeception
- travis_retry composer global require "codeception/codeception=2.0.*" "codeception/specify=*" "codeception/verify=*"
# basic and advanced application:
- tests/unit/data/travis/setup-apps.sh
before_script:
- echo 'elasticsearch version ' && curl http://localhost:9200/
- mysql -e 'CREATE DATABASE yiitest;';
- psql -U postgres -c 'CREATE DATABASE yiitest;';
- tests/unit/data/travis/sphinx-setup.sh
- mongo yii2test --eval 'db.addUser("travis", "test");'
# basic and advanced application:
- tests/unit/data/travis/init-apps.sh
script:
- vendor/bin/phpunit --verbose --coverage-clover=coverage.clover --exclude-group mssql,oci,wincache,xcache,zenddata
- |
if (php --version | grep -i HipHop > /dev/null); then
echo "Skipping basic application tests on HHVM"
else
cd apps/basic/web
php -S localhost:8080 > /dev/null 2>&1 &
cd ../tests
codecept run
fi
- |
if (php --version | grep -i HipHop > /dev/null); then
echo "Skipping advanced application tests on HHVM"
else
cd apps/advanced
php -S localhost:8080 > /dev/null 2>&1 &
cd tests
codecept run
fi
after_script:
- cd ../../..
- travis_retry wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
>>>>>>> official/master