forked from ichikaway/cakephp-mongodb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
86 lines (79 loc) · 2.72 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
language: php
php:
- 5.3
- 5.4
services:
- mongodb
env:
- CAKEPHP=2.3.10 PECLMONGO=mongo-1.2.9
- CAKEPHP=2.3.10 PECLMONGO=mongo-1.3.7
- CAKEPHP=2.4.10 PECLMONGO=mongo-1.4.5
- CAKEPHP=2.5.2 PECLMONGO=mongo-1.4.5
matrix:
fast_finish: true
allow_failures:
- php: 5.4
before_script:
- sh -c "wget http://pecl.php.net/get/$PECLMONGO.tgz"
- sh -c "tar xfz $PECLMONGO.tgz"
- sh -c "cd $PECLMONGO && phpize && ./configure && make && sudo make install"
- echo "extension=mongo.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
- wget https://github.com/cakephp/cakephp/tarball/$CAKEPHP -O cake.tar.gz
- tar xf cake.tar.gz
- mv cakephp-cakephp-* ./cakephp
- mkdir -p ./cakephp/app/Plugin/Mongodb
- mv Model ./cakephp/app/Plugin/Mongodb
- mv Test ./cakephp/app/Plugin/Mongodb
- chmod -R 777 ./cakephp/app/tmp
- echo "<?php
CakePlugin::loadAll();
ini_set('include_path', '/home/travis/build/ichikaway/cakephp-mongodb/cakephp/vendor/phpunit/phpunit' . PATH_SEPARATOR . ini_get('include_path'));
" > cakephp/app/Config/bootstrap.php
- echo "<?php
class DATABASE_CONFIG {
public \$default = array(
'datasource' => 'Mongodb.MongodbSource',
'database' => 'mongo_test',
'host' => '127.0.0.1',
'login' => 'travis',
'password' => 'test',
'port' => '27017',
'prefix' => '',
'encoding' => 'utf8',
);
public \$test = array(
'datasource' => 'Mongodb.MongodbSource',
'database' => 'mongo_test',
'host' => '127.0.0.1',
'login' => 'travis',
'password' => 'test',
'port' => '27017',
'prefix' => '',
'encoding' => 'utf8',
);
}" > cakephp/app/Config/database.php
- echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<phpunit bootstrap=\"vendor/autoload.php\">
<filter>
<blacklist>
<directory suffix=\".php\">app/Config</directory>
<directory suffix=\".php\">app/Controller</directory>
<directory suffix=\".php\">app/Model</directory>
<directory suffix=\".php\">app/Test</directory>
<directory suffix=\".php\">app/Vendor</directory>
<directory suffix=\".php\">app/Plugin/Mongodb/Test</directory>
<directory suffix=\".php\">lib</directory>
<directory suffix=\".php\">vendor</directory>
</blacklist>
</filter>
</phpunit>
" > cakephp/phpunit.xml.dist
- mv coveralls.json cakephp/composer.json
- mv .coveralls.yml cakephp/.coveralls.yml
- cd ./cakephp
- composer install --dev
- mkdir -p build/logs
script:
- ./app/Console/cake test Mongodb All --stderr --coverage-clover build/logs/clover.xml --configuration phpunit.xml.dist
after_script:
- php vendor/bin/coveralls -v