add doctrine migration to CI

refs #402
move webapp directory to App/app, for being consistent with person bundle
This commit is contained in:
Julien Fastré 2015-01-30 15:57:24 +01:00
parent 31f76d1339
commit 962dba1bc5
14 changed files with 44 additions and 33 deletions

4
.gitignore vendored
View File

@ -1,2 +1,4 @@
/vendor/
composer.lock
composer.lock
Tests/Fixtures/App/app/config/parameters.yml
*~

View File

@ -1,31 +1,29 @@
language: php
php:
- 5.5
- 5.6
- hhvm-nightly
- 5.5
- 5.6
- hhvm-nightly
matrix:
allow_failures:
- php: hhvm-nightly
- php: hhvm-nightly
addons:
postgresql: "9.3"
postgresql: '9.3'
sudo: false
install:
- composer install --dev
- cp Tests/Fixtures/App/config/parameters.travis.yml Tests/Fixtures/App/config/parameters.yml
install:
- composer config -g github-oauth.github.com $GITHUB_COMPOSER_AUTH
- composer install --dev --no-interaction
- cp Tests/Fixtures/App/config/parameters.travis.yml Tests/Fixtures/App/config/parameters.yml
before_script:
- psql -c 'create database test0;' -U postgres
- php Tests/Fixtures/App/console --env=test cache:warmup
# - php Tests/Fixtures/App/console assets:install Tests/Fixtures/App/web
- php Tests/Fixtures/App/console doctrine:schema:create --env=test --no-interaction
- php Tests/Fixtures/App/console doctrine:fixtures:load --env=test --no-interaction
- psql -c 'create database test0;' -U postgres
- psql -d test0 -c 'CREATE EXTENSION unaccent;' -U postgres
- php Tests/Fixtures/App/app/console --env=test cache:warmup
- php Tests/Fixtures/App/console assets:install Tests/Fixtures/App/web
- php Tests/Fixtures/App/app/console doctrine:migrations:migrate --no-interaction
- php Tests/Fixtures/App/app/console doctrine:fixtures:load --env=test --no-interaction
script: phpunit --coverage-text
notifications:
email:
- info@champs-libres.coop
- info@champs-libres.coop
env:
global:
secure: WUAweJ9uyCNVQsv8OOD5jofcxSlRLHbI9HBsDDdSuPVLhCcJCLRdQ312wtn5ckfy3pe+aKaijrM/rhd0NQ6lwCkcYAXcikug9k5tf2BJ0H7AJnqe56/cQSrXvxV8n6L1S2xk4AugG/k6PngZQeca5k/34jJ9ViI06V2+r4UrL7w=

View File

@ -2,7 +2,6 @@
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
use Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle;
class AppKernel extends Kernel
{
@ -18,7 +17,8 @@ class AppKernel extends Kernel
new Chill\PersonBundle\ChillPersonBundle(),
new \Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle()
new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle()
);
}

View File

@ -0,0 +1,2 @@
*
!.gitignore

View File

@ -7,7 +7,7 @@
set_time_limit(0);
require_once __DIR__.'/../../bootstrap.php';
require_once __DIR__.'/../../../bootstrap.php';
require_once __DIR__.'/AppKernel.php';
use Symfony\Bundle\FrameworkBundle\Console\Application;

View File

@ -1,7 +0,0 @@
parameters:
database_host: 127.0.0.1
database_port: 5435
database_name: chill
database_user: chill
database_password: chill
locale: fr

2
Tests/Fixtures/App/web/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

View File

@ -28,10 +28,24 @@
"doctrine/doctrine-bundle": "~1.2",
"chill-project/main": "dev-master@dev",
"chill-project/custom-fields": "dev-master@dev",
"chill-project/person": "dev-master@dev"
"chill-project/person": "dev-master@dev",
"champs-libres/composer-bundle-migration": "~1.0",
"doctrine/doctrine-migrations-bundle": "dev-master@dev",
"doctrine/migrations": "~1.0@dev"
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "~2.2",
"fzaninotto/faker": "~1"
},
"scripts": {
"post-install-cmd": [
"ComposerBundleMigration\\Composer\\Migrations::synchronizeMigrations"
],
"post-update-cmd": [
"ComposerBundleMigration\\Composer\\Migrations::synchronizeMigrations"
]
},
"extra": {
"app-migrations-dir": "Tests/Fixtures/App/app/DoctrineMigrations"
}
}