-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
68 lines (61 loc) · 1.89 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
language: php
php:
- 5.4
- 5.5
env:
global:
- REPO_NAME=cakephp-state-machine
- PLUGIN_NAME=StateMachine
matrix:
- CAKE_VERSION=2.2.0
- CAKE_VERSION=2.3.0
- CAKE_VERSION=2.4.0
before_install:
- composer self-update
install:
- pear channel-discover pear.cakephp.org
- pear install --alldeps cakephp/CakePHP_CodeSniffer
- phpenv rehash
- composer install --dev --prefer-source
before_script:
- mysql -e 'CREATE DATABASE cakephp_test;'
- cd ..
- git clone git://github.com/cakephp/cakephp cakephp
- cd cakephp
- git checkout $CAKE_VERSION
- chmod -R 770 app/tmp
- cp -R ../$REPO_NAME app/Plugin/$PLUGIN_NAME
- echo "CakePlugin::load('$PLUGIN_NAME');" >> app/Config/bootstrap.php
- set +H
- echo "<?php
class DATABASE_CONFIG {
public \$default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => '0.0.0.0',
'login' => 'travis',
'password' => '',
'database' => 'cakephp_test',
'prefix' => ''
);
public \$test = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => '0.0.0.0',
'login' => 'travis',
'password' => '',
'database' => 'cakephp_test',
'prefix' => ''
);
}" > app/Config/database.php
script:
- cd app/
- mkdir -p build/logs
- phpcs --standard=CakePHP --ignore=*/vendor/* Plugin/$PLUGIN_NAME
- ./Console/cake test $PLUGIN_NAME StateMachine/Model/Behavior/StateMachineBehavior --stderr --coverage-clover build/logs/clover.xml
after_script:
- php Plugin/$PLUGIN_NAME/vendor/bin/coveralls -v
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover --repository g/$TRAVIS_REPO_SLUG --revision $TRAVIS_COMMIT build/logs/clover.xml
notifications:
email: false