GeezerVison is showing github.com — tools: use @reporters/github when running in github actions · nodejs/node@3471758
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: tools/test.py +8-1Lines changed: 8 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -316,6 +316,12 @@ def HasRun(self, output): |
316 | 316 | sys.stdout.flush() |
317 | 317 |
|
318 | 318 | 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 | + |
319 | 325 | def GetAnnotationInfo(self, test, output): |
320 | 326 | traceback = output.stdout + output.stderr |
321 | 327 | find_full_path = re.search(r' +at .*\(.*%s:([0-9]+):([0-9]+)' % test.file, traceback) |
@@ -601,7 +607,8 @@ def Run(self): |
601 | 607 | result = self.RunCommand(self.GetCommand(), { |
602 | 608 | "TEST_SERIAL_ID": "%d" % self.serial_id, |
603 | 609 | "TEST_THREAD_ID": "%d" % self.thread_id, |
604 | | - "TEST_PARALLEL" : "%d" % self.parallel |
| 610 | + "TEST_PARALLEL" : "%d" % self.parallel, |
| 611 | + "GITHUB_STEP_SUMMARY": "", |
605 | 612 | }) |
606 | 613 | finally: |
607 | 614 | # Tests can leave the tty in non-blocking mode. If the test runner |
|