Skip to content

Commit

Permalink
report-infectionn
Browse files Browse the repository at this point in the history
  • Loading branch information
JosueUPT committed Dec 11, 2024
1 parent d6e69f1 commit 6a18d4b
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions .github/workflows/php-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,17 @@ jobs:
echo '{
"source": {
"directories": ["src"],
"excludes": ["src/views", "src/Config"]
"excludes": [
"src/Views",
"src/Config"
]
},
"logs": {
"text": "public/mutations/infection.log",
"html": "public/mutations/index.html",
"summary": "public/mutations/summary.log",
"json": "public/mutations/infection.json",
"perMutator": "public/mutations/per-mutator.md"
"text": "./public/mutations/infection.log",
"html": "./public/mutations/index.html",
"summary": "./public/mutations/summary.log",
"json": "./public/mutations/infection.json",
"perMutator": "./public/mutations/per-mutator.md"
},
"mutators": {
"@default": true
Expand All @@ -113,19 +116,22 @@ jobs:
"minCoveredMsi": 0
}' > infection.temp.json
# Primero ejecutar PHPUnit para generar la cobertura
# Limpiar cobertura anterior
rm -rf coverage
# Generar cobertura nueva
echo "Generando cobertura con PHPUnit..."
XDEBUG_MODE=coverage vendor/bin/phpunit \
--coverage-xml=coverage/coverage-xml \
--log-junit=coverage/junit.xml \
--coverage-xml=./coverage/coverage-xml \
--log-junit=./coverage/junit.xml \
--testsuite=Unit || true
# Ejecutar Infection
echo "Ejecutando análisis de mutación..."
vendor/bin/infection \
--threads=4 \
--configuration=infection.temp.json \
--coverage=coverage \
--coverage=./coverage \
--only-covered \
--skip-initial-tests \
--ignore-msi-with-no-mutations \
Expand All @@ -140,12 +146,10 @@ jobs:
ls -l public/mutations/
else
echo "✗ Error: El reporte HTML no se generó"
echo "Contenido de infection.temp.json:"
cat infection.temp.json
echo "Contenido de public/mutations:"
ls -la public/mutations/
echo "Contenido de coverage:"
ls -la coverage/
echo "Contenido de coverage/coverage-xml:"
ls -la coverage/coverage-xml/
fi
# Limpiar archivo temporal
Expand Down

0 comments on commit 6a18d4b

Please sign in to comment.