Skip to content

Commit

Permalink
report-infection
Browse files Browse the repository at this point in the history
  • Loading branch information
JosueUPT committed Dec 11, 2024
1 parent d9fd697 commit b61058c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/php-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,24 @@ jobs:
- name: Run Infection tests
run: |
echo "Ejecutando Infection tests..."
# Primero ejecutar PHPUnit para generar la cobertura
echo "Generando cobertura con PHPUnit..."
XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-xml=coverage/coverage-xml --log-junit=coverage/junit.xml
# Luego ejecutar Infection usando la cobertura generada
echo "Ejecutando análisis de mutación..."
mkdir -p public/infection
vendor/bin/infection --threads=4 --only-covered --skip-initial-tests --coverage=coverage --logger-html=public/infection/infection.html || true
vendor/bin/infection --threads=4 --coverage=coverage --only-covered --skip-initial-tests --logger-html=public/infection/infection.html || true
# Verificar la generación del reporte
if [ -f "public/infection/infection.html" ]; then
echo "✓ Reporte de Infection generado correctamente"
ls -l public/infection/
else
echo "✗ Error al generar el reporte de Infection"
echo "Contenido del directorio coverage:"
ls -R coverage/
exit 1
fi
Expand Down

0 comments on commit b61058c

Please sign in to comment.