Skip to content
This repository has been archived by the owner on Aug 10, 2022. It is now read-only.

Commit

Permalink
travis configuration and docker compose file prepared
Browse files Browse the repository at this point in the history
  • Loading branch information
maniolek committed Oct 19, 2016
1 parent ff0626b commit 462532c
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 5 deletions.
16 changes: 12 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,28 @@ language: php

php:
- 5.4
- 5.5
- 5.6

services:
- mongodb
- memcached

before_install:
- mysql -e "CREATE DATABASE IF NOT EXISTS vegas_test;" -uroot
env:
global:
- PHALCON_VERSION="phalcon-v2.0.8"
- CC="ccache gcc"
- PATH="$PATH:~/bin"
- MONGO_DB_NAME=vegas_test
- VEGAS_CMF_AUTH_MONGO_PORT_27017_TCP_ADDR=localhost
- VEGAS_CMF_AUTH_MONGO_PORT_27017_TCP_PORT=27017

before_script:
- phpenv config-add travis/php.ini
- git clone -q --depth=1 https://github.com/phalcon/cphalcon.git -b phalcon-v2.0.8
- git clone -q --depth=1 https://github.com/phalcon/cphalcon.git -b ${PHALCON_VERSION}
- (cd cphalcon/ext; export CFLAGS="-g3 -O1 -fno-delete-null-pointer-checks -Wall"; phpize && ./configure --enable-phalcon && make -j4 && sudo make install && phpenv config-add ../unit-tests/ci/phalcon.ini)
- curl -s http://getcomposer.org/installer | php
- php composer.phar install --dev
- travis_retry composer install --dev --no-interaction

script:
- mkdir -p tests/fixtures/cache
Expand Down
23 changes: 23 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
mongo:
image: mongo:3.0.8
container_name: vegas-cmf-auth-mongo
command: mongod --smallfiles
expose:
- 27017
- 28017
environment:
- AUTH=no
- TERM=xterm-256color

phpunit:
image: amsdard/phalcon:2.0.8-fpm-5.6
container_name: vegas-cmf-auth-phpunit
working_dir: /var/www/html
command: vendor/bin/phpunit
environment:
- TERM=xterm-256color
- MONGO_DB_NAME=vegas_test
links:
- mongo:vegas-cmf-auth-mongo
volumes:
- ./:/var/www/html
4 changes: 3 additions & 1 deletion tests/config.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?php
return array(
'mongo' => array(
'db' => 'vegas_test',
'db' => getenv('MONGO_DB_NAME'),
'host' => getenv('VEGAS_CMF_AUTH_MONGO_PORT_27017_TCP_ADDR'),
'port' => getenv('VEGAS_CMF_AUTH_MONGO_PORT_27017_TCP_PORT')
),

'session' => array(
Expand Down
12 changes: 12 additions & 0 deletions tests/fixtures/app/config/modules.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php return array (
'Test' =>
array (
'className' => 'Test\\Module',
'path' => '/var/www/html/tests/fixtures/app/modules/Test/Module.php',
),
'Home' =>
array (
'className' => 'Home\\Module',
'path' => '/var/www/html/tests/fixtures/app/modules/Home/Module.php',
),
);
6 changes: 6 additions & 0 deletions tests/fixtures/app/config/services.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php return array (
'CollectionManagerServiceProvider' => '/var/www/html/tests/fixtures/app/services/CollectionManagerServiceProvider.php',
'MongoServiceProvider' => '/var/www/html/tests/fixtures/app/services/MongoServiceProvider.php',
'ViewCacheServiceProvider' => '/var/www/html/tests/fixtures/app/services/ViewCacheServiceProvider.php',
'UrlServiceProvider' => '/var/www/html/tests/fixtures/app/services/UrlServiceProvider.php',
);

0 comments on commit 462532c

Please sign in to comment.