-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (39 loc) · 1.3 KB
/
benchmark.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
# https://github.com/rhysd/github-action-benchmark/blob/master/.github/workflows/benchmarkjs.yml
name: Benchmark
on: ["pull_request"]
jobs:
benchmark:
name: Run JavaScript benchmark
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
node: [18, 20, 22]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: corepack enable
- name: yarn install
run: yarn --immutable
shell: bash
- name: build
run: yarn build
shell: bash
- name: Run benchmark
run: node --max-old-space-size=6144 benchmarks/main-register-ts-node.js | tee benchmarks/output.txt
- name: Store benchmark result
uses: rhysd/github-action-benchmark@v1
with:
name: benchmarkjs, node ${{ matrix.node }}
tool: "benchmarkjs"
output-file-path: benchmarks/output.txt
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: "110%"
comment-always: ${{ matrix.node == 20 }}
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: "@bnaya"