Skip to content
Browse files

Adding travis test configuration for CLI

  • Loading branch information...
1 parent cfd242a commit d5f46f0ba886375292c4ce0ee65b04ecb3242213 @Ocramius Ocramius committed Apr 16, 2012
Showing with 53 additions and 6 deletions.
  1. +4 −2 .travis.yml
  2. +4 −4 .travis/run-cli.sh
  3. +45 −0 .travis/travis.doctrine_orm.local.config.php
View
6 .travis.yml
@@ -7,15 +7,17 @@ php:
# cloning a custom zend skeleton application, running composer on it and replacing the module with
# the one that has been checked out.
before_script:
+ - mysql -e 'create database travis_test;'
- cd ..
- git clone git://github.com/Ocramius/ZendSkeletonApplication.git -b doctrine-orm-module-tests --recursive
- cd ZendSkeletonApplication
- wget -nc http://getcomposer.org/composer.phar
- php composer.phar install
- rm -rf vendor/doctrine/DoctrineORMModule
- cp -r ../DoctrineORMModule vendor/doctrine/
+ - cp ../DoctrineORMModule/.travis/travis.doctrine_orm.local.config.php config/autoload/
-script:
+script:
- ./vendor/doctrine/DoctrineORMModule/.travis/run-cli.sh
- cd vendor/doctrine/DoctrineORMModule/tests
- - phpunit
+ - phpunit
View
8 .travis/run-cli.sh
@@ -4,13 +4,13 @@
./vendor/doctrine/DoctrineModule/bin/doctrine orm:clear-cache:query
./vendor/doctrine/DoctrineModule/bin/doctrine orm:clear-cache:result
./vendor/doctrine/DoctrineModule/bin/doctrine orm:clear-cache:query
-./vendor/doctrine/DoctrineModule/bin/doctrine orm:ensure-production-settings
./vendor/doctrine/DoctrineModule/bin/doctrine orm:generate-proxies
+./vendor/doctrine/DoctrineModule/bin/doctrine orm:ensure-production-settings
./vendor/doctrine/DoctrineModule/bin/doctrine orm:info
-./vendor/doctrine/DoctrineModule/bin/doctrine orm:run-dql "SELECT COUNT(a) FROM TravisTest\TestEntity a"
./vendor/doctrine/DoctrineModule/bin/doctrine orm:schema-tool:create
./vendor/doctrine/DoctrineModule/bin/doctrine orm:schema-tool:update
-./vendor/doctrine/DoctrineModule/bin/doctrine orm:schema-tool:validate-schema
+./vendor/doctrine/DoctrineModule/bin/doctrine orm:validate-schema
+./vendor/doctrine/DoctrineModule/bin/doctrine orm:run-dql "SELECT COUNT(a) FROM DoctrineORMModuleTest\Assets\Entity\Test a"
./vendor/doctrine/DoctrineModule/bin/doctrine orm:schema-tool:drop
./vendor/doctrine/DoctrineModule/bin/doctrine migrations:generate --configuration=vendor/doctrine/DoctrineORMModule/.travis/migrations-config.xml
-./vendor/doctrine/DoctrineModule/bin/doctrine migrations:diff --configuration=vendor/doctrine/DoctrineORMModule/.travis/migrations-config.xml
+./vendor/doctrine/DoctrineModule/bin/doctrine migrations:diff --configuration=vendor/doctrine/DoctrineORMModule/.travis/migrations-config.xml
View
45 .travis/travis.doctrine_orm.local.config.php
@@ -0,0 +1,45 @@
+<?php
+return array(
+ 'di' => array(
+ 'instance' => array(
+ 'orm_config' => array(
+ 'parameters' => array(
+ 'opts' => array(
+ 'auto_generate_proxies' => false,
+ 'proxy_dir' => 'data/DoctrineORMModule/Proxy',
+ 'proxy_namespace' => 'DoctrineORMModule\Proxy',
+ ),
+ 'metadataCache' => 'doctrine_cache_array',
+ 'queryCache' => 'doctrine_cache_array',
+ 'resultCache' => 'doctrine_cache_array',
+ )
+ ),
+ 'orm_connection' => array(
+ 'parameters' => array(
+ 'params' => array(
+ 'driver' => 'pdo_mysql',
+ 'host' => 'localhost',
+ 'port' => '3306',
+ 'user' => 'root',
+ 'password' => '',
+ 'dbname' => 'travis_test',
+ ),
+ ),
+ ),
+ 'orm_driver_chain' => array(
+ 'parameters' => array(
+ 'drivers' => array(
+ 'application_annotation_driver' => array(
+ 'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
+ 'namespace' => 'DoctrineORMModuleTest\Assets\Entity',
+ 'paths' => array(
+ 'vendor/doctrine/DoctrineORMModule/tests/DoctrineORMModuleTest/Assets/Entity'
+ ),
+ ),
+ ),
+ 'cache' => 'doctrine_cache_array',
+ )
+ ),
+ ),
+ ),
+);

0 comments on commit d5f46f0

Please sign in to comment.
Something went wrong with that request. Please try again.