Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
14098 anikendra 1
language: php
2
 
3
php:
4
  - 5.3
5
  - 5.4
6
 
7
services:
8
  - mongodb
9
 
10
env:
11
  - CAKEPHP=2.3.10 PECLMONGO=mongo-1.2.9
12
  - CAKEPHP=2.3.10 PECLMONGO=mongo-1.3.7
13
  - CAKEPHP=2.4.10 PECLMONGO=mongo-1.4.5
14
  - CAKEPHP=2.5.2 PECLMONGO=mongo-1.4.5
15
 
16
matrix:
17
  fast_finish: true
18
  allow_failures:
19
    - php: 5.4
20
 
21
before_script:
22
  - sh -c "wget http://pecl.php.net/get/$PECLMONGO.tgz"
23
  - sh -c "tar xfz $PECLMONGO.tgz"
24
  - sh -c "cd $PECLMONGO && phpize && ./configure && make && sudo make install"
25
  - echo "extension=mongo.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
26
  - wget https://github.com/cakephp/cakephp/tarball/$CAKEPHP -O cake.tar.gz
27
  - tar xf cake.tar.gz
28
  - mv cakephp-cakephp-* ./cakephp
29
  - mkdir -p ./cakephp/app/Plugin/Mongodb
30
  - mv Model ./cakephp/app/Plugin/Mongodb
31
  - mv Test ./cakephp/app/Plugin/Mongodb
32
  - chmod -R 777 ./cakephp/app/tmp
33
  - echo "<?php
34
    CakePlugin::loadAll();
35
    ini_set('include_path',  '/home/travis/build/ichikaway/cakephp-mongodb/cakephp/vendor/phpunit/phpunit' . PATH_SEPARATOR . ini_get('include_path'));
36
    " > cakephp/app/Config/bootstrap.php
37
  - echo "<?php
38
    class DATABASE_CONFIG {
39
    public \$default = array(
40
      'datasource' => 'Mongodb.MongodbSource',
41
      'database' => 'mongo_test',
42
      'host' => '127.0.0.1',
43
      'login' => 'travis',
44
      'password' => 'test',
45
      'port' => '27017',
46
      'prefix' => '',
47
      'encoding' => 'utf8',
48
    );
49
    public \$test = array(
50
      'datasource' => 'Mongodb.MongodbSource',
51
      'database' => 'mongo_test',
52
      'host' => '127.0.0.1',
53
      'login' => 'travis',
54
      'password' => 'test',
55
      'port' => '27017',
56
      'prefix' => '',
57
      'encoding' => 'utf8',
58
    );
59
    }" > cakephp/app/Config/database.php
60
  - echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
61
    <phpunit bootstrap=\"vendor/autoload.php\">
62
    <filter>
63
        <blacklist>
64
            <directory suffix=\".php\">app/Config</directory>
65
            <directory suffix=\".php\">app/Controller</directory>
66
            <directory suffix=\".php\">app/Model</directory>
67
            <directory suffix=\".php\">app/Test</directory>
68
            <directory suffix=\".php\">app/Vendor</directory>
69
            <directory suffix=\".php\">app/Plugin/Mongodb/Test</directory>
70
            <directory suffix=\".php\">lib</directory>
71
            <directory suffix=\".php\">vendor</directory>
72
        </blacklist>
73
    </filter>
74
    </phpunit>
75
    " > cakephp/phpunit.xml.dist
76
  - mv coveralls.json cakephp/composer.json
77
  - mv .coveralls.yml cakephp/.coveralls.yml
78
  - cd ./cakephp
79
  - composer install --dev
80
  - mkdir -p build/logs
81
 
82
script:
83
  - ./app/Console/cake test Mongodb All --stderr --coverage-clover build/logs/clover.xml --configuration phpunit.xml.dist
84
 
85
after_script:
86
  - php vendor/bin/coveralls -v