chore: ajoute une cible de rapports de tests

make test-cov produit la couverture HTML et XML et les resultats au format
JUnit, sans alourdir make test qui reste la boucle de developpement. Les trois
artefacts sont ignores, contrairement au junit.xml versione cote frontend.
This commit is contained in:
Johan LEROY
2026-09-15 09:59:17 +02:00
parent c95f4d3851
commit d14b3afc8e
2 changed files with 7 additions and 2 deletions
+6 -2
View File
@@ -1,8 +1,8 @@
BACKEND := apps/backend
.DEFAULT_GOAL := help
.PHONY: help install dev lint format typecheck test test-integration check docker-build \
db-up db-down db-reset db-logs db-psql migrate
.PHONY: help install dev lint format typecheck test test-cov test-integration check \
docker-build db-up db-down db-reset db-logs db-psql migrate
help: ## Liste les cibles disponibles
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-16s\033[0m %s\n", $$1, $$2}'
@@ -25,6 +25,10 @@ typecheck: ## Verifie le typage du backend
test: ## Execute les tests backend ne demandant pas de base
cd $(BACKEND) && uv run pytest
test-cov: ## Rapports de couverture HTML et XML, plus les resultats au format JUnit
cd $(BACKEND) && uv run pytest --cov-report=html --cov-report=xml \
--junitxml=test-results/junit.xml
test-integration: ## Execute les tests exigeant une base joignable
cd $(BACKEND) && uv run pytest -m integration