Add list-suites and list-tests options to limit report size

This commit is contained in:
Michal Dorner 2021-01-25 12:53:45 +01:00
parent 0919385c06
commit 3744805866
No known key found for this signature in database
GPG key ID: 9EEE04B48DA36786
20 changed files with 28593 additions and 18534 deletions

View file

@ -14,16 +14,11 @@ export function getCheckRunSha(): string {
}
export function enforceCheckRunLimits(result: TestResult, maxAnnotations: number): void {
const output = result.output
if (!output) {
return
}
// Limit number of created annotations
output.annotations?.splice(maxAnnotations + 1)
result.annotations.splice(maxAnnotations + 1)
// Limit number of characters in annotation fields
for (const err of output.annotations ?? []) {
for (const err of result.annotations) {
err.title = ellipsis(err.title || '', 255)
err.message = ellipsis(err.message, 65535)
}