Skip to content

Commit

Permalink
tools: use @reporters/github when running in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
MoLow committed Aug 13, 2023
1 parent 5f5c709 commit 2e7edf2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,12 @@ def HasRun(self, output):
sys.stdout.flush()

class ActionsAnnotationProgressIndicator(DotsProgressIndicator):
def AboutToRun(self, case):
if not hasattr(case, 'additional_flags'):
case.additional_flags = []
case.additional_flags.append('--test-reporter=./tools/github_reporter/index.js')
case.additional_flags.append('--test-reporter-destination=stdout')

def GetAnnotationInfo(self, test, output):
traceback = output.stdout + output.stderr
find_full_path = re.search(r' +at .*\(.*%s:([0-9]+):([0-9]+)' % test.file, traceback)
Expand Down Expand Up @@ -601,7 +607,8 @@ def Run(self):
result = self.RunCommand(self.GetCommand(), {
"TEST_SERIAL_ID": "%d" % self.serial_id,
"TEST_THREAD_ID": "%d" % self.thread_id,
"TEST_PARALLEL" : "%d" % self.parallel
"TEST_PARALLEL" : "%d" % self.parallel,
"GITHUB_STEP_SUMMARY": "",
})
finally:
# Tests can leave the tty in non-blocking mode. If the test runner
Expand Down

0 comments on commit 2e7edf2

Please sign in to comment.