From b6f8692f6f649959d1bdbc3ec9afc7127096634e Mon Sep 17 00:00:00 2001 From: Emmanuel Averty Date: Mon, 16 Oct 2023 10:04:43 +0200 Subject: [PATCH] docs: add test target in makefile template --- docs/makefile.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/makefile.md b/docs/makefile.md index 739dea043..90f19a5d4 100644 --- a/docs/makefile.md +++ b/docs/makefile.md @@ -46,7 +46,7 @@ SYMFONY = $(PHP) bin/console # Misc .DEFAULT_GOAL = help -.PHONY : help build up start down logs sh composer vendor sf cc +.PHONY : help build up start down logs sh composer vendor sf cc test ## —— 🎵 🐳 The Symfony Docker Makefile 🐳 🎵 —————————————————————————————————— help: ## Outputs this help screen @@ -70,6 +70,11 @@ logs: ## Show live logs sh: ## Connect to the FrankenPHP container @$(PHP_CONT) sh +test: ## Start tests with phpunit, pass the parameter "c=" to add options to phpunit, example: make test c="--group e2e --stop-on-failure" + @$(eval c ?=) + @$(DOCKER_COMP) exec -e APP_ENV=test php bin/phpunit $(c) + + ## —— Composer 🧙 —————————————————————————————————————————————————————————————— composer: ## Run composer, pass the parameter "c=" to run a given command, example: make composer c='req symfony/orm-pack' @$(eval c ?=)