Skip to content

Commit

Permalink
test: add comment with perf report result
Browse files Browse the repository at this point in the history
  • Loading branch information
binoy14 committed Sep 20, 2024
1 parent ce46ba7 commit aa7a3d1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/efps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,17 @@ jobs:
VITE_PERF_EFPS_DATASET: ${{ secrets.PERF_EFPS_DATASET }}
PERF_EFPS_SANITY_TOKEN: ${{ secrets.PERF_EFPS_SANITY_TOKEN }}
run: pnpm efps:test

- name: PR comment with report
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # v2
if: ${{ github.event_name == 'pull_request' }}
with:
comment_tag: "efps-report"
filePath: ${{ github.workspace }}/perf/efps/results/benchmark-results.md

- uses: actions/upload-artifact@v3
if: always()
with:
name: efps-report
path: perf/efps/results
retention-days: 30
4 changes: 2 additions & 2 deletions perf/efps/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ markdownLines.push(
)
markdownLines.push('\n')

// Write markdown file
const markdownOutputPath = path.join(resultsDir, 'benchmark-results.md')
// Write markdown file to root of results
const markdownOutputPath = path.join(workspaceDir, 'results', 'benchmark-results.md')
await fs.promises.writeFile(markdownOutputPath, markdownLines.join('\n'))

// Exit with code 1 if regression detected
Expand Down

0 comments on commit aa7a3d1

Please sign in to comment.