mirror of
https://github.com/wallabag/wallabag.git
synced 2025-06-07 07:58:48 +00:00
Move prepare database commands to the bootstrap file
This commit is contained in:
parent
c35aa64079
commit
4a4b584a46
3 changed files with 31 additions and 19 deletions
16
.github/workflows/continuous-integration.yml
vendored
16
.github/workflows/continuous-integration.yml
vendored
|
@ -73,12 +73,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
composer-options: "--optimize-autoloader --prefer-dist"
|
composer-options: "--optimize-autoloader --prefer-dist"
|
||||||
|
|
||||||
- name: "Prepare database"
|
- name: "Prepare database configuration"
|
||||||
run: |
|
run: cp app/config/tests/parameters_test.${{ matrix.database }}.yml app/config/parameters_test.yml
|
||||||
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"
|
- name: "Prepare fixtures"
|
||||||
run: "make fixtures"
|
run: "make fixtures"
|
||||||
|
@ -148,12 +144,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
composer-options: "--optimize-autoloader --prefer-dist"
|
composer-options: "--optimize-autoloader --prefer-dist"
|
||||||
|
|
||||||
- name: "Prepare database"
|
- name: "Prepare database configuration"
|
||||||
run: |
|
run: cp app/config/tests/parameters_test.${{ matrix.database }}.yml app/config/parameters_test.yml
|
||||||
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"
|
- name: "Prepare fixtures"
|
||||||
run: "make fixtures"
|
run: "make fixtures"
|
||||||
|
|
|
@ -31,15 +31,10 @@ build: ## Run webpack
|
||||||
@yarn install
|
@yarn install
|
||||||
@yarn build:$(ENV)
|
@yarn build:$(ENV)
|
||||||
|
|
||||||
prepare: ## Prepare database for testsuite
|
|
||||||
-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
|
|
||||||
|
|
||||||
fixtures: ## Load fixtures into database
|
fixtures: ## Load fixtures into database
|
||||||
php bin/console doctrine:fixtures:load --no-interaction --env=test
|
php bin/console doctrine:fixtures:load --no-interaction --env=test
|
||||||
|
|
||||||
test: prepare fixtures ## Launch wallabag testsuite
|
test: fixtures ## Launch wallabag testsuite
|
||||||
XDEBUG_MODE=off php -dmemory_limit=-1 bin/phpunit -v
|
XDEBUG_MODE=off php -dmemory_limit=-1 bin/phpunit -v
|
||||||
|
|
||||||
release: ## Create a package. Need a VERSION parameter (eg: `make release VERSION=master`).
|
release: ## Create a package. Need a VERSION parameter (eg: `make release VERSION=master`).
|
||||||
|
@ -51,6 +46,6 @@ endif
|
||||||
deploy: ## Deploy wallabag
|
deploy: ## Deploy wallabag
|
||||||
@bundle exec cap staging deploy
|
@bundle exec cap staging deploy
|
||||||
|
|
||||||
.PHONY: help prepare install fixtures update build test release deploy run dev
|
.PHONY: help install fixtures update build test release deploy run dev
|
||||||
|
|
||||||
.DEFAULT_GOAL := install
|
.DEFAULT_GOAL := install
|
||||||
|
|
|
@ -1,7 +1,32 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Symfony\Component\Filesystem\Filesystem;
|
use Symfony\Component\Filesystem\Filesystem;
|
||||||
|
use Symfony\Component\Process\Process;
|
||||||
|
|
||||||
require __DIR__ . '/../vendor/autoload.php';
|
require __DIR__ . '/../vendor/autoload.php';
|
||||||
|
|
||||||
(new Filesystem())->remove(__DIR__ . '/../var/cache/test');
|
(new Filesystem())->remove(__DIR__ . '/../var/cache/test');
|
||||||
|
|
||||||
|
(new Process([
|
||||||
|
'php',
|
||||||
|
__DIR__ . '/../bin/console',
|
||||||
|
'doctrine:database:drop',
|
||||||
|
'--force',
|
||||||
|
'--env=test',
|
||||||
|
]))->run();
|
||||||
|
|
||||||
|
(new Process([
|
||||||
|
'php',
|
||||||
|
__DIR__ . '/../bin/console',
|
||||||
|
'doctrine:database:create',
|
||||||
|
'--env=test',
|
||||||
|
]))->mustRun();
|
||||||
|
|
||||||
|
(new Process([
|
||||||
|
'php',
|
||||||
|
__DIR__ . '/../bin/console',
|
||||||
|
'doctrine:migrations:migrate',
|
||||||
|
'--no-interaction',
|
||||||
|
'--env=test',
|
||||||
|
'-vv',
|
||||||
|
]))->mustRun();
|
||||||
|
|
Loading…
Reference in a new issue