Move loading fixtures to the bootstrap file

This commit is contained in:
Yassine Guedidi 2024-01-07 22:33:20 +01:00
parent 4a4b584a46
commit 99ad390144
3 changed files with 10 additions and 11 deletions

View file

@ -76,9 +76,6 @@ jobs:
- name: "Prepare database configuration"
run: cp app/config/tests/parameters_test.${{ matrix.database }}.yml app/config/parameters_test.yml
- name: "Prepare fixtures"
run: "make fixtures"
- name: "Run PHPUnit"
run: "php bin/phpunit -v"
@ -147,8 +144,5 @@ jobs:
- name: "Prepare database configuration"
run: cp app/config/tests/parameters_test.${{ matrix.database }}.yml app/config/parameters_test.yml
- name: "Prepare fixtures"
run: "make fixtures"
- name: "Run PHPUnit"
run: "php bin/phpunit -v"

View file

@ -31,10 +31,7 @@ build: ## Run webpack
@yarn install
@yarn build:$(ENV)
fixtures: ## Load fixtures into database
php bin/console doctrine:fixtures:load --no-interaction --env=test
test: fixtures ## Launch wallabag testsuite
test: ## Launch wallabag testsuite
XDEBUG_MODE=off php -dmemory_limit=-1 bin/phpunit -v
release: ## Create a package. Need a VERSION parameter (eg: `make release VERSION=master`).
@ -46,6 +43,6 @@ endif
deploy: ## Deploy wallabag
@bundle exec cap staging deploy
.PHONY: help install fixtures update build test release deploy run dev
.PHONY: help install update build test release deploy run dev
.DEFAULT_GOAL := install

View file

@ -30,3 +30,11 @@ require __DIR__ . '/../vendor/autoload.php';
'--env=test',
'-vv',
]))->mustRun();
(new Process([
'php',
__DIR__ . '/../bin/console',
'doctrine:fixtures:load',
'--no-interaction',
'--env=test',
]))->mustRun();