forked from ichikaway/cakephp-mongodb
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
60 lines (55 loc) · 1.79 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
language: php
php:
- 5.3
services:
- mongodb
env:
- CAKEPHP=2.2.5 PECLMONGO=mongo-1.2.9
- CAKEPHP=2.2.7 PECLMONGO=mongo-1.2.9
- CAKEPHP=2.3.0 PECLMONGO=mongo-1.2.9
- CAKEPHP=2.2.5 PECLMONGO=mongo-1.3.4
- CAKEPHP=2.2.7 PECLMONGO=mongo-1.3.4
- CAKEPHP=2.3.0 PECLMONGO=mongo-1.3.4
before_script:
- mongo mongo_test --eval 'db.addUser("travis", "test");'
- 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
- cd ./cakephp
script:
- ./lib/Cake/Console/cake test Mongodb Behavior/SqlCompatible --stderr
- ./lib/Cake/Console/cake test Mongodb Datasource/MongodbSource --stderr