forked from neilcrookes/CakePHP-ReST-DataSource-Plugin
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
47 lines (41 loc) · 1.17 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
language: php
branches:
except:
- 1.3
php:
- 5.3
- 5.4
- 5.5
- 5.6
env:
- CAKE_VERSION=2.3.10
- CAKE_VERSION=2.4.10
- CAKE_VERSION=master
install:
- git clone git://github.com/cakephp/cakephp ../cakephp && cd ../cakephp && git checkout $CAKE_VERSION
- chmod -R 777 app/tmp
- mv ../CakePHP-ReST-DataSource-Plugin plugins/Rest
- sh -c "composer global require 'phpunit/phpunit=3.7.33'"
- sh -c "ln -s ~/.composer/vendor/phpunit/phpunit/PHPUnit PHPUnit"
- cd plugins/Rest
- composer install
- cd ../../
before_script:
- sh -c "mysql -e 'CREATE DATABASE cakephp_test;'"
- echo "
Configure::write('Security.salt', 'travistestcakephp');
Configure::write('Security.cipherSeed', '176859309657453542496749683645');
CakePlugin::loadAll();
" >> ../cakephp/app/Config/bootstrap.php
- echo "<?php
class DATABASE_CONFIG {
public \$test = array(
'datasource' => 'Database/Mysql',
'database' => 'cakephp_test',
'host' => '0.0.0.0',
'login' => 'travis',
'persistent' => false,
);
}" > ../cakephp/app/Config/database.php
script:
- ./lib/Cake/Console/cake test Rest Model/Datasource/RestSource --stderr