-
Notifications
You must be signed in to change notification settings - Fork 45
46 lines (38 loc) · 1.47 KB
/
benchmark.pr-check.yml
File metadata and controls
46 lines (38 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Benchmark-PR-Check
on:
pull_request:
concurrency:
group: 'workflow-${{ github.workflow }}-${{ github.ref }}'
cancel-in-progress: true
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: true
- name: Install and execute benchmark
uses: ./.github/actions/benchmark
- name: Load benchmark from target branch
run: |
git fetch origin ${{ github.base_ref }}
git show origin/${{ github.base_ref }}:packages/tools/benchmark-tests/benchmark-baseline.json > packages/tools/benchmark-tests/benchmark-baseline.json || echo "[]" > packages/tools/benchmark-tests/benchmark-baseline.json
- name: Compare benchmark with baseline
run: node scripts/compare-benchmark.mjs
working-directory: packages/tools/benchmark-tests
- name: Find comment
uses: peter-evans/find-comment@v3
id: fc
with:
body-includes: Hydration Benchmark Report
comment-author: 'github-actions[bot]'
issue-number: ${{ github.event.pull_request.number }}
- name: Post PR Comment
uses: peter-evans/create-or-update-comment@v4
with:
body-path: packages/tools/benchmark-tests/benchmark-report.md
comment-id: ${{ steps.fc.outputs.comment-id }}
edit-mode: replace
issue-number: ${{ github.event.pull_request.number }}