Skip to content

Commit 3471758

Browse files
MoLowRafaelGSS
authored andcommitted
tools: use @reporters/github when running in github actions
PR-URL: #49129 Refs: #49120 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 95a6e76 commit 3471758

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tools/test.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,12 @@ def HasRun(self, output):
316316
sys.stdout.flush()
317317

318318
class ActionsAnnotationProgressIndicator(DotsProgressIndicator):
319+
def AboutToRun(self, case):
320+
if not hasattr(case, 'additional_flags'):
321+
case.additional_flags = []
322+
case.additional_flags.append('--test-reporter=./tools/github_reporter/index.js')
323+
case.additional_flags.append('--test-reporter-destination=stdout')
324+
319325
def GetAnnotationInfo(self, test, output):
320326
traceback = output.stdout + output.stderr
321327
find_full_path = re.search(r' +at .*\(.*%s:([0-9]+):([0-9]+)' % test.file, traceback)
@@ -601,7 +607,8 @@ def Run(self):
601607
result = self.RunCommand(self.GetCommand(), {
602608
"TEST_SERIAL_ID": "%d" % self.serial_id,
603609
"TEST_THREAD_ID": "%d" % self.thread_id,
604-
"TEST_PARALLEL" : "%d" % self.parallel
610+
"TEST_PARALLEL" : "%d" % self.parallel,
611+
"GITHUB_STEP_SUMMARY": "",
605612
})
606613
finally:
607614
# Tests can leave the tty in non-blocking mode. If the test runner

0 commit comments

Comments
 (0)