File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,10 @@ inputs:
106
106
description : ' Skips summaries that would not contain failed tests'
107
107
required : false
108
108
default : ' false'
109
+ include_empty_in_summary :
110
+ description : ' Include entries in summaries that have 0 count'
111
+ required : false
112
+ default : ' true'
109
113
group_suite :
110
114
description : ' If enabled, will group the testcases by test suite in the `detailed_summary`'
111
115
required : false
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ export async function run(): Promise<void> {
34
34
const flakySummary = core . getInput ( 'flaky_summary' ) === 'true'
35
35
const verboseSummary = core . getInput ( 'verbose_summary' ) === 'true'
36
36
const skipSuccessSummary = core . getInput ( 'skip_success_summary' ) === 'true'
37
+ const includeEmptyInSummary = core . getInput ( 'include_empty_in_summary' ) === 'true'
37
38
const groupSuite = core . getInput ( 'group_suite' ) === 'true'
38
39
const comment = core . getInput ( 'comment' ) === 'true'
39
40
const updateComment = core . getInput ( 'updateComment' ) === 'true'
@@ -178,7 +179,8 @@ export async function run(): Promise<void> {
178
179
flakySummary ,
179
180
verboseSummary ,
180
181
skipSuccessSummary ,
181
- groupSuite
182
+ groupSuite ,
183
+ includeEmptyInSummary
182
184
)
183
185
if ( jobSummary && supportsJobSummary ) {
184
186
try {
Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ export function buildSummaryTables(
10
10
flakySummary : boolean ,
11
11
verboseSummary : boolean ,
12
12
skipSuccessSummary : boolean ,
13
- groupSuite = false
13
+ groupSuite = false ,
14
+ includeEmptyInSummary = false
14
15
) : [ SummaryTableRow [ ] , SummaryTableRow [ ] , SummaryTableRow [ ] ] {
15
16
// only include a warning icon if there are skipped tests
16
17
const hasPassed = testResults . some ( testResult => testResult . passed > 0 )
@@ -58,10 +59,10 @@ export function buildSummaryTables(
58
59
for ( const testResult of testResults ) {
59
60
table . push ( [
60
61
`${ testResult . checkName } ` ,
61
- `${ testResult . totalCount } ran` ,
62
- `${ testResult . passed } passed` ,
63
- `${ testResult . skipped } skipped` ,
64
- `${ testResult . failed } failed`
62
+ includeEmptyInSummary || testResult . totalCount > 0 ? `${ testResult . totalCount } ran` : ` `,
63
+ includeEmptyInSummary || testResult . passed > 0 ? `${ testResult . passed } passed` : ` `,
64
+ includeEmptyInSummary || testResult . skipped > 0 ? `${ testResult . skipped } skipped` : ` `,
65
+ includeEmptyInSummary || testResult . failed > 0 ? `${ testResult . failed } failed` : ` `
65
66
] )
66
67
67
68
const annotations = testResult . globalAnnotations . filter (
You can’t perform that action at this time.
0 commit comments