From c35aa6407977edfa189b37e20e8c0c10c8ffb61f Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Sun, 7 Jan 2024 22:21:04 +0100 Subject: [PATCH] Move prepare database commands to CI workflow --- .github/workflows/continuous-integration.yml | 12 ++++++++++-- GNUmakefile | 3 --- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 43b45fe9b..172f40324 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -74,7 +74,11 @@ jobs: composer-options: "--optimize-autoloader --prefer-dist" - name: "Prepare database" - run: "make prepare DB=${{ matrix.database }}" + run: | + cp app/config/tests/parameters_test.${{ matrix.database }}.yml app/config/parameters_test.yml + php bin/console doctrine:database:drop --force --env=test + php bin/console doctrine:database:create --env=test + php bin/console doctrine:migrations:migrate --no-interaction --env=test -vv - name: "Prepare fixtures" run: "make fixtures" @@ -145,7 +149,11 @@ jobs: composer-options: "--optimize-autoloader --prefer-dist" - name: "Prepare database" - run: "make prepare DB=${{ matrix.database }}" + run: | + cp app/config/tests/parameters_test.${{ matrix.database }}.yml app/config/parameters_test.yml + php bin/console doctrine:database:drop --force --env=test + php bin/console doctrine:database:create --env=test + php bin/console doctrine:migrations:migrate --no-interaction --env=test -vv - name: "Prepare fixtures" run: "make fixtures" diff --git a/GNUmakefile b/GNUmakefile index 378cfa7d5..403551e08 100755 --- a/GNUmakefile +++ b/GNUmakefile @@ -32,9 +32,6 @@ build: ## Run webpack @yarn build:$(ENV) prepare: ## Prepare database for testsuite -ifdef DB - cp app/config/tests/parameters_test.$(DB).yml app/config/parameters_test.yml -endif -php bin/console doctrine:database:drop --force --env=test php bin/console doctrine:database:create --env=test php bin/console doctrine:migrations:migrate --no-interaction --env=test -vv