Account for existing content in step summary

This commit is contained in:
Byron Goldsack 2025-09-03 15:21:22 +12:00
parent aa953f36f9
commit f86f37a955

View file

@ -56,7 +56,12 @@ export function getReport(results: TestRunResult[], options: ReportOptions = DEF
}
function getMaxReportLength(options: ReportOptions = DEFAULT_OPTIONS): number {
return options.useActionsSummary ? MAX_ACTIONS_SUMMARY_LENGTH : MAX_REPORT_LENGTH
if (options.useActionsSummary) {
const currentSummaryContent = core.summary.stringify()
const currentSummarySize = getByteLength(currentSummaryContent)
return MAX_ACTIONS_SUMMARY_LENGTH - currentSummarySize
}
return MAX_REPORT_LENGTH
}
function trimReport(lines: string[], options: ReportOptions): string {