Skip to content

Commit b4a051c

Browse files
committed
fix test count reporting to not triple-count
1 parent 23cb19d commit b4a051c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/_ci.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,8 @@ jobs:
528528
STATISTICS_SCRIPT: |
529529
summary_line=$(tail -n1 test-te.log)
530530
errors=$(echo $summary_line | grep -oE '[0-9]+ error' | awk '{print $1} END { if (!NR) print 0}')
531-
passed_tests=$(cat pytest-report.jsonl | jq -r 'select(."$report_type" == "TestReport" and .outcome == "passed") | .outcome' | wc -l)
532-
failed_tests=$(cat pytest-report.jsonl | jq -r 'select(."$report_type" == "TestReport" and .outcome == "failed") | .outcome' | wc -l)
531+
passed_tests=$(cat pytest-report.jsonl | jq -r 'select(."$report_type" == "TestReport" and .when == "call" and .outcome == "passed") | .outcome' | wc -l)
532+
failed_tests=$(cat pytest-report.jsonl | jq -r 'select(."$report_type" == "TestReport" and .when == "call" and .outcome == "failed") | .outcome' | wc -l)
533533
total_tests=$((failed_tests + passed_tests))
534534
echo "TOTAL_TESTS=${total_tests}" >> $GITHUB_OUTPUT
535535
echo "ERRORS=${errors}" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)