File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
plugins/wpgraphql-logging/bin Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -69,8 +69,8 @@ run_tests() {
6969 # Prefer XML summary for robustness; fallback to HTML if present
7070 if [[ -f " tests/_output/coverage.xml" ]]; then
7171 # Extract total statements and covered statements from the summary metrics line
72- total_statements=$( grep -Eo ' statements="[0-9]+"' " tests/_output/coverage.xml" | head -1 | grep -Eo ' [0-9]+' )
73- total_covered=$( grep -Eo ' coveredstatements="[0-9]+"' " tests/_output/coverage.xml" | head -1 | grep -Eo ' [0-9]+' )
72+ total_statements=$( grep -Eo ' statements="[0-9]+"' " tests/_output/coverage.xml" | tail -1 | grep -Eo ' [0-9]+' )
73+ total_covered=$( grep -Eo ' coveredstatements="[0-9]+"' " tests/_output/coverage.xml" | tail -1 | grep -Eo ' [0-9]+' )
7474 if [[ -n " $total_statements " && -n " $total_covered " && " $total_statements " -gt 0 ]]; then
7575 coverage_percent=$( awk " BEGIN { printf \" %.2f\" , ($total_covered / $total_statements ) * 100 }" )
7676 fi
You can’t perform that action at this time.
0 commit comments