Skip to content

Commit 33c455f

Browse files
authored
Fix summary length error (#18232)
1 parent 9c26cb3 commit 33c455f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,19 @@ jobs:
278278
set +x
279279
280280
cat report.html >> $GITHUB_STEP_SUMMARY
281+
282+
SUMMARY_SIZE=$(wc -c < $GITHUB_STEP_SUMMARY)
283+
if [[ $SUMMARY_SIZE -gt 1000000 ]]; then
284+
head -c 1000000 $GITHUB_STEP_SUMMARY > $GITHUB_STEP_SUMMARY.tmp
285+
mv $GITHUB_STEP_SUMMARY.tmp $GITHUB_STEP_SUMMARY
286+
(
287+
echo '.....'
288+
echo ''
289+
echo ':x: **WARNING: Summary is too large and has been truncated.**'
290+
echo ''
291+
) >> $GITHUB_STEP_SUMMARY
292+
fi
293+
281294
exit $RESULT
282295
- name: "Upload Test Coverage Report"
283296
uses: actions/upload-artifact@v3

0 commit comments

Comments
 (0)