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 37f56e2 commit 71cc079
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/php-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,15 @@ jobs:
run: |
echo "Ejecutando Infection tests..."
# Configurar variables de entorno para las pruebas
export DB_HOST=localhost
export DB_USER=root
export DB_PASS=root
export DB_NAME=test_db
# 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
XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-xml=coverage/coverage-xml --log-junit=coverage/junit.xml || true
# Crear archivo de configuración temporal para Infection
echo '{
Expand All @@ -99,7 +105,8 @@ jobs:
"testFramework": "phpunit",
"bootstrap": "./vendor/autoload.php",
"initialTestsPhpOptions": "-d xdebug.mode=coverage",
"timeout": 10
"timeout": 10,
"testFrameworkOptions": "--no-configuration"
}' > infection.temp.json
# Crear directorio para infection
Expand All @@ -117,7 +124,9 @@ jobs:
--logger-html=public/infection/infection.html \
--ignore-msi-with-no-mutations \
--no-progress \
--formatter=progress || true
--formatter=progress \
--min-msi=0 \
--min-covered-msi=0 || true
# Verificar la generación del reporte
if [ -f "public/infection/infection.html" ]; then
Expand Down

0 comments on commit 71cc079

Please sign in to comment.