-
Notifications
You must be signed in to change notification settings - Fork 4
53 lines (51 loc) · 1.66 KB
/
bench.yml
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
47
48
49
50
51
52
53
name: Benchmark
on:
push:
branches:
- main
jobs:
benchmark:
name: Performance comparison
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: npm
- name: Build
run: |
npm ci
npm run lint
npm run build
- name: Test
run: node test/index.js
- name: Reset
run: git reset --hard
- name: Benchmark hex parsing
run: node test/hexbench.js | tee output.txt
- name: Store hex parsing results
uses: rhysd/github-action-benchmark@v1
with:
name: HEX parsing
# What benchmark tool the output.txt came from
tool: 'benchmarkjs'
# Where the output from the benchmark tool is stored
output-file-path: output.txt
# Personal access token to deploy GitHub Pages branch
github-token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
# Push and deploy GitHub pages branch automatically
auto-push: true
- name: Benchmark against other libraries
run: node test/compare.js | tee output.txt
- name: Store compare results
uses: rhysd/github-action-benchmark@v1
with:
name: Comparison
# What benchmark tool the output.txt came from
tool: 'benchmarkjs'
# Where the output from the benchmark tool is stored
output-file-path: output.txt
# Personal access token to deploy GitHub Pages branch
github-token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
# Push and deploy GitHub pages branch automatically
auto-push: true