Skip to content

Commit 3b1f8b7

Browse files
committed
Add benchmark to PR workflow
1 parent aa67068 commit 3b1f8b7

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/pr.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,24 @@ jobs:
3535
run: npm run lint
3636
- name: Test
3737
run: npm test
38+
39+
- name: Benchmark
40+
run: npm run benchmark | tee benchmark.txt
41+
42+
- name: Download previous benchmark data
43+
uses: actions/cache@v3
44+
with:
45+
path: ./cache
46+
key: ${{ runner.os }}-benchmark
47+
48+
- name: Store benchmark result
49+
uses: benchmark-action/github-action-benchmark@v1
50+
with:
51+
tool: 'benchmarkjs'
52+
output-file-path: benchmark.txt
53+
external-data-json-path: ./cache/benchmark-data.json
54+
github-token: ${{ secrets.GITHUB_TOKEN }}
55+
alert-threshold: '150%'
56+
comment-on-alert: true
57+
fail-on-alert: true
58+
alert-comment-cc-users: '@Stuk'

0 commit comments

Comments
 (0)