Skip to content

Commit 2ca1161

Browse files
committed
Improve CI log cleanup
1 parent e82b849 commit 2ca1161

File tree

1 file changed

+36
-13
lines changed

1 file changed

+36
-13
lines changed

open-bot.yaml

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,25 +77,32 @@ rules:
7777
id: logResult
7878
value: "{{{fetch}}}"
7979
remove:
80+
- "\\m\\[2K\\m\\[1G|\\m\\[999D\\m\\[K"
8081
- "^[\\s\\S]+?\\$ yarn travis:\\$JOB_PART.*\n"
8182
- "\\$ node --max-old-space-size=4096.*\n"
82-
- "^yarn run.+\n"
83-
- "\\(node:\\d+\\) \\[DEP0005\\].+\n"
83+
- ".+rimraf coverage"
84+
- "yarn run.+\n"
85+
- "\\(node:\\d+\\) (\\[DEP0005\\]|DeprecationWarning).+\n"
8486
- "\\$ yarn (cover|test):.+\n"
8587
- "Ran all test suites.\n[\\s\\S]*"
86-
- "PASS test/.*\n"
88+
- "error Command failed with exit code \\d+.\n"
89+
- "info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\n"
90+
- "Force exiting Jest\n\nHave you considered.+"
91+
- "=============================== Coverage summary ===============================[\\s\\S]+?================================================================================"
92+
- " *PASS *test/.*\n"
93+
- "^\\s+|\\s+$"
8794
string_cleanup_1:
8895
id: firstError
8996
value: "{{{logResult}}}"
9097
remove:
91-
- "\n\n ●[\\s\\S]*"
98+
- "\n\n(| FAIL)[\\s\\S]*"
9299
- "Test Suites:[\\s\\S]*"
93100
- "\\s+$"
94101
string_cleanup_2:
95102
id: remainingErrors
96103
value: "{{{logResult}}}"
97104
remove:
98-
- "^[\\s\\S]+?(?=\n\n ●|$)"
105+
- "^[\\s\\S]+?(?=\n\n(| FAIL)|$)"
99106
- "^\n+"
100107
- "Test Suites:[\\s\\S]*"
101108
- "\\s+$"
@@ -155,25 +162,33 @@ rules:
155162
id: logResult
156163
value: "{{{fetch}}}"
157164
remove:
165+
- "\\m\\[2K\\m\\[1G|\\m\\[999D\\m\\[K"
158166
- "^[\\s\\S]+?\\$ yarn travis:\\$JOB_PART.*\n"
159167
- "\\$ node --max-old-space-size=4096.*\n"
160-
- "^yarn run.+\n"
161-
- "\\(node:\\d+\\) \\[DEP0005\\].+\n"
168+
- ".+rimraf coverage"
169+
- "yarn run.+\n"
170+
- "\\(node:\\d+\\) (\\[DEP0005\\]|DeprecationWarning).+\n"
162171
- "\\$ yarn (cover|test):.+\n"
163172
- "The command \"yarn travis:\\$JOB_PART\" exited[\\s\\S]*"
164-
- "PASS test/.*\n"
173+
- "Ran all test suites.+\n"
174+
- "error Command failed with exit code \\d+.\n"
175+
- "info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\n"
176+
- "Force exiting Jest\n\nHave you considered.+"
177+
- "=============================== Coverage summary ===============================[\\s\\S]+?================================================================================"
178+
- " *PASS *test/.*\n"
179+
- "^\\s+|\\s+$"
165180
string_cleanup_1:
166181
id: firstError
167182
value: "{{{logResult}}}"
168183
remove:
169-
- "\n\n ●[\\s\\S]*"
184+
- "\n\n(| FAIL)[\\s\\S]*"
170185
- "Test Suites:[\\s\\S]*"
171186
- "\\s+$"
172187
string_cleanup_2:
173188
id: remainingErrors
174189
value: "{{{logResult}}}"
175190
remove:
176-
- "^[\\s\\S]+?(?=\n\n ●|$)"
191+
- "^[\\s\\S]+?(?=\n\n(| FAIL)|$)"
177192
- "^\n+"
178193
- "Test Suites:[\\s\\S]*"
179194
- "\\s+$"
@@ -233,13 +248,21 @@ rules:
233248
id: logResult
234249
value: "{{{fetch}}}"
235250
remove:
251+
- "\\m\\[2K\\m\\[1G|\\m\\[999D\\m\\[K"
236252
- "^[\\s\\S]+?\\$ yarn travis:\\$JOB_PART.*\n"
237253
- "\\$ node --max-old-space-size=4096.*\n"
238-
- "^yarn run.+\n"
239-
- "\\(node:\\d+\\) \\[DEP0005\\].+\n"
254+
- ".+rimraf coverage"
255+
- "yarn run.+\n"
256+
- "\\(node:\\d+\\) (\\[DEP0005\\]|DeprecationWarning).+\n"
240257
- "\\$ yarn (unit|lint).+\n"
241258
- "The command \"yarn travis:\\$JOB_PART\" exited[\\s\\S]*"
242-
- "PASS test/.*\n"
259+
- "Ran all test suites.+\n"
260+
- "error Command failed with exit code \\d+.\n"
261+
- "info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\n"
262+
- "Force exiting Jest\n\nHave you considered.+"
263+
- "=============================== Coverage summary ===============================[\\s\\S]+?================================================================================"
264+
- " *PASS *test/.*\n"
265+
- "^\\s+|\\s+$"
243266
actions:
244267
comment:
245268
identifier: "ci-result"

0 commit comments

Comments
 (0)