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 71cc079 commit cc84fe6
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/php-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ jobs:
export DB_PASS=root
export DB_NAME=test_db
# Crear directorio para mutations
mkdir -p public/mutations
# 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 || true
Expand All @@ -97,7 +100,7 @@ jobs:
"excludes": ["src/views", "src/Config"]
},
"logs": {
"html": "public/infection/infection.html"
"html": "public/mutations/index.html"
},
"mutators": {
"@default": true
Expand All @@ -109,9 +112,6 @@ jobs:
"testFrameworkOptions": "--no-configuration"
}' > infection.temp.json
# Crear directorio para infection
mkdir -p public/infection
# Ejecutar Infection con la configuración temporal
echo "Ejecutando análisis de mutación..."
vendor/bin/infection \
Expand All @@ -121,23 +121,21 @@ jobs:
--source=src \
--only-covered \
--skip-initial-tests \
--logger-html=public/infection/infection.html \
--ignore-msi-with-no-mutations \
--no-progress \
--formatter=progress \
--min-msi=0 \
--min-covered-msi=0 || true
# Verificar la generación del reporte
if [ -f "public/infection/infection.html" ]; then
echo "✓ Reporte de Infection generado correctamente"
ls -l public/infection/
echo "Verificando reporte generado..."
if [ -f "public/mutations/index.html" ]; then
echo "✓ Reporte de mutations generado correctamente"
ls -l public/mutations/
else
echo "✗ Error al generar el reporte de Infection"
echo "Contenido del directorio src:"
ls -R src/
echo "Contenido del directorio coverage:"
ls -R coverage/coverage-xml/
echo "✗ Error: El reporte de mutations no se generó"
echo "Contenido de public:"
ls -la public/
fi
# Limpiar archivo temporal
Expand Down

0 comments on commit cc84fe6

Please sign in to comment.