-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
59 lines (51 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
language: php
php:
- 5.3
- 5.4
- 5.5
services:
- memcached
env:
global:
- PLUGIN_NAME=Memcached
matrix:
- CAKE_VERSION=2.2.0 DB=mysql
- CAKE_VERSION=2.3.0 DB=mysql
- CAKE_VERSION=2.4.0 DB=mysql
- CAKE_VERSION=master DB=mysql
matrix:
include:
- php: 5.4
env:
- CAKE_VERSION=master DB=mysql COVERALLS=1
- php: 5.4
env:
- CAKE_VERSION=master DB=mysql PHPCS=1
before_script:
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- git clone git://github.com/cakephp/cakephp ../cakephp && cd ../cakephp && git checkout $CAKE_VERSION
- cp -R ../CakePHP-Memcached-Engine app/Plugin/$PLUGIN_NAME
- chmod -R 777 ../cakephp/app/tmp
- set +H
- echo "
App::uses('MemcachedEngine', '$PLUGIN_NAME.Lib/Cache/Engine');
CakePlugin::loadAll();" >> ../cakephp/app/Config/bootstrap.php
- cd app/Plugin/$PLUGIN_NAME
- composer self-update
- composer install --prefer-source --dev --no-interaction
- sh -c "if [ '$COVERALLS' = '1' ]; then composer require --dev satooshi/php-coveralls:dev-master; fi"
- sh -c "if [ '$PHPCS' = '1' ]; then pear channel-discover pear.cakephp.org; fi"
- sh -c "if [ '$PHPCS' = '1' ]; then pear install --alldeps cakephp/CakePHP_CodeSniffer; fi"
- echo "# for php-coveralls
src_dir:./" > .coveralls.yml
- phpenv rehash
- cd ../../Console
script:
- sh -c "if [ '$PHPCS' != '1' ]; then
mkdir -p build/logs;
./cake test $PLUGIN_NAME Cache/Engine/MemcachedEngine --stderr --configuration ../Plugin/$PLUGIN_NAME/Test/phpunit.xml;
else
phpcs -p --ignore='Test/*,vendor/*' --extensions=php --standard=CakePHP ../Plugin/$PLUGIN_NAME;
fi"
after_script:
- sh -c "if [ '$COVERALLS' = '1' ]; then php ../Plugin/$PLUGIN_NAME/vendor/bin/coveralls -v; fi"