diff --git a/makefile b/makefile index 96e2bc9..c8e481c 100644 --- a/makefile +++ b/makefile @@ -62,8 +62,10 @@ restart: ## Restart dev container (stop + start) rebuild: ## Rebuild containers (useful after Dockerfile changes) @printf "$(YELLOW)$(SPARK) Rebuilding containers$(RESET)\n" - $(DOCKER) build - $(DOCKER) up --force-recreate --build -d + @$(MAKE) stop + @printf "$(YELLOW)$(TRASH) Deleting all Docker resources$(RESET)\n" + docker system prune --all --volumes --force + @$(MAKE) start ps: ## Show docker compose ps $(DOCKER) ps @@ -139,9 +141,15 @@ fmt: ## Format code (php-cs-fixer) test: ## Run test suite (phpunit) @printf "$(CHECK) $(GREEN)Running unit tests$(RESET)\n" - @$(DOCKER) up $(COMPOSER_RUNTIME) -d --no-recreate + @$(DOCKER) up $(COMPOSER_RUNTIME) -d $(COMPOSER) "composer run-script tests:unit || true" +test-coverage: ## Run test suite with coverage report + @printf "$(CHECK) $(GREEN)Running unit tests with coverage report$(RESET)\n" + @$(DOCKER) up $(COMPOSER_RUNTIME) -d + @$(MAKE) enable-coverage + $(COMPOSER) "composer run-script tests:unit:coverage || true" + # Convenience aliases dev: run ## Alias for start ci: composer-install license-check lint test ## CI-like local flow