Skip to content

Commit 4e1bf9e

Browse files
committed
ci(benchmark): copy report to GITHUB_STEP_SUMMARY
1 parent f1a1997 commit 4e1bf9e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

ci/github-actions/report-benchmark-result-pr.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { getOctokit, context } from '@actions/github'
22
import console from 'console'
3-
import { readFileSync } from 'fs'
3+
import { appendFileSync, readFileSync } from 'fs'
44
import process from 'process'
55
import { Item as RegressionItem, collectRegressions } from './benchmark/collect-regressions'
66
import { SelfBenchmarkCategory, parseSelfBenchmarkCategory } from './benchmark/matrix'
@@ -69,6 +69,11 @@ async function main() {
6969
reportBody,
7070
].join('\n')
7171

72+
const stepSummaryPath = env.load('GITHUB_STEP_SUMMARY', '')
73+
if (stepSummaryPath) {
74+
appendFileSync(stepSummaryPath, overallReport + '\n')
75+
}
76+
7277
const auth = env.load('GITHUB_TOKEN')
7378
const github = getOctokit(auth).rest
7479

0 commit comments

Comments
 (0)