From 8e75f0b4aca13e2c034d86e14010a3c26f3ab0f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 26 Oct 2015 20:46:59 +0100 Subject: [PATCH] adding gitlab-ci to project MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Squashed commit of the following: commit 7de95e8e1e829f2ebeeb0bcea750e9fd2cdfa4b4 Author: Julien Fastré Date: Mon Oct 19 23:40:01 2015 +0200 adapting config for build commit c554816956ee1d0f0144824392a5f5984b389d1a Author: Julien Fastré Date: Mon Oct 19 22:42:39 2015 +0200 add gitlab-ci to project --- .gitlab-ci.yml | 17 ++++++++ Test/Fixtures/App/app/AppKernel.php | 40 +++++++++++-------- ...itlab-ci.dist => parameters.gitlab-ci.yml} | 2 +- 3 files changed, 42 insertions(+), 17 deletions(-) create mode 100644 .gitlab-ci.yml rename Test/Fixtures/App/app/config/{parameters.yml.gitlab-ci.dist => parameters.gitlab-ci.yml} (79%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..02ac74a1a --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,17 @@ +services: + - chill/database:latest + +before_script: + - export GITHUB_COMPOSER_AUTH=$GITHUB_TOKEN + - composer install --no-interaction + - cp Test/Fixtures/App/app/config/parameters.gitlab-ci.yml Test/Fixtures/App/app/config/parameters.yml +# - php Test/Fixtures/App/app/console --env=test cache:warmup + - php Test/Fixtures/App/app/console doctrine:migrations:migrate --env=test --no-interaction + - php Test/Fixtures/App/app/console doctrine:fixtures:load --env=test --no-interaction + +test:php-5.6: + stage: test + script: phpunit --testdox +test:php-7: + stage: test + script: phpunit --testdox diff --git a/Test/Fixtures/App/app/AppKernel.php b/Test/Fixtures/App/app/AppKernel.php index 4cf584f1d..d639d79d5 100644 --- a/Test/Fixtures/App/app/AppKernel.php +++ b/Test/Fixtures/App/app/AppKernel.php @@ -7,33 +7,41 @@ class AppKernel extends Kernel { public function registerBundles() { - $bundles = array( + return array( new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), + new Chill\CustomFieldsBundle\ChillCustomFieldsBundle(), new Symfony\Bundle\SecurityBundle\SecurityBundle(), new Symfony\Bundle\TwigBundle\TwigBundle(), - new Symfony\Bundle\MonologBundle\MonologBundle(), - new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), - new Symfony\Bundle\AsseticBundle\AsseticBundle(), + new \Symfony\Bundle\AsseticBundle\AsseticBundle(), new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), - new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), - new Chill\MainBundle\ChillMainBundle(), - new Chill\CustomFieldsBundle\ChillCustomFieldsBundle(), new Chill\PersonBundle\ChillPersonBundle(), + new Chill\MainBundle\ChillMainBundle(), new Chill\ActivityBundle\ChillActivityBundle(), + new \Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(), + new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(), + new Symfony\Bundle\MonologBundle\MonologBundle(), + #add here all the required bundle (some bundle are not required) ); - - if (in_array($this->getEnvironment(), array('dev', 'test'))) { - $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle(); - $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); - $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); - $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); - } - - return $bundles; } public function registerContainerConfiguration(LoaderInterface $loader) { $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml'); } + + /** + * @return string + */ + public function getCacheDir() + { + return sys_get_temp_dir().'/ActivityBundle/cache'; + } + + /** + * @return string + */ + public function getLogDir() + { + return sys_get_temp_dir().'/ActivityBundle/logs'; + } } diff --git a/Test/Fixtures/App/app/config/parameters.yml.gitlab-ci.dist b/Test/Fixtures/App/app/config/parameters.gitlab-ci.yml similarity index 79% rename from Test/Fixtures/App/app/config/parameters.yml.gitlab-ci.dist rename to Test/Fixtures/App/app/config/parameters.gitlab-ci.yml index f734a35c7..9e3b75daf 100644 --- a/Test/Fixtures/App/app/config/parameters.yml.gitlab-ci.dist +++ b/Test/Fixtures/App/app/config/parameters.gitlab-ci.yml @@ -1,5 +1,5 @@ parameters: - database_host: 127.0.0.1 + database_host: chill__database database_port: 5432 database_name: postgres database_user: postgres