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:
@@ -9,6 +9,7 @@ venv/
|
||||
.coverage
|
||||
coverage.xml
|
||||
htmlcov/
|
||||
test-results/
|
||||
dist/
|
||||
build/
|
||||
*.egg-info/
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user