-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
24 lines (16 loc) · 780 Bytes
/
Copy pathMakefile
File metadata and controls
24 lines (16 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.PHONY: coverage
coverage:
# 1. Nettoyage
rm -rf coverage-data/*.cov
mkdir -p coverage-data
# 2. Lancement des containers (web en arrière-plan)
docker compose up -d web
# 3. Exécution de PHPUnit dans le container web
docker compose exec -e APP_ENV=test web vendor/bin/phpunit --coverage-php coverage-data/phpunit.cov
# 4. Exécution de Playwright
docker compose run playwright npx playwright test
# 5. Fusion et génération du rapport (depuis le container web qui a phpcov et les sources)
docker compose exec web vendor/bin/phpcov merge --html html-report coverage-data/
@echo "Rapport généré dans le dossier html-report/"
get-percentage:
@docker compose exec web sh -c "vendor/bin/phpcov merge coverage-data/ | grep 'Lines:' | awk '{print \$$2}'"