@@ -17,6 +17,7 @@ export async function run(): Promise<void> {
17
17
return
18
18
}
19
19
20
+ const groupReports = core . getInput ( 'group_reports' ) === 'true'
20
21
const annotateOnly = core . getInput ( 'annotate_only' ) === 'true'
21
22
const updateCheck = core . getInput ( 'update_check' ) === 'true'
22
23
const checkAnnotations = core . getInput ( 'check_annotations' ) === 'true'
@@ -103,7 +104,26 @@ export async function run(): Promise<void> {
103
104
mergedResult . failed += testResult . failed
104
105
mergedResult . passed += testResult . passed
105
106
mergedResult . retried += testResult . retried
106
- testResults . push ( testResult )
107
+
108
+ if ( groupReports ) {
109
+ testResults . push ( testResult )
110
+ } else {
111
+ for ( const actualTestResult of testResult . testResults ) {
112
+ const failedCount = actualTestResult . annotations . filter ( a => a . annotation_level === 'failure' ) . length
113
+ testResults . push ( {
114
+ checkName : actualTestResult . name ,
115
+ summary : testResult . summary ,
116
+ totalCount : actualTestResult . totalCount ,
117
+ skipped : actualTestResult . skippedCount ,
118
+ failed : failedCount ,
119
+ passed : actualTestResult . totalCount - failedCount - actualTestResult . skippedCount ,
120
+ retried : actualTestResult . retriedCount ,
121
+ foundFiles : 1 ,
122
+ globalAnnotations : actualTestResult . annotations ,
123
+ testResults : actualTestResult . testResults
124
+ } )
125
+ }
126
+ }
107
127
}
108
128
109
129
core . setOutput ( 'total' , mergedResult . totalCount )
0 commit comments