forked from ichikaway/cakephp-mongodb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
80 lines (74 loc) · 2.6 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
language: php
php:
- 5.3
services:
- mongodb
env:
- CAKEPHP=2.2.8 PECLMONGO=mongo-1.2.9
- CAKEPHP=2.3.4 PECLMONGO=mongo-1.2.9
- CAKEPHP=2.2.8 PECLMONGO=mongo-1.3.7
- CAKEPHP=2.3.4 PECLMONGO=mongo-1.3.7
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();
" > 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
- curl -s http://getcomposer.org/installer | php
- php composer.phar install --dev --no-interaction --prefer-source
- mkdir -p build/logs
script:
- ./lib/Cake/Console/cake test Mongodb All --stderr --coverage-clover build/logs/clover.xml --configuration phpunit.xml.dist
after_script:
- php vendor/bin/coveralls -v