-
-
Notifications
You must be signed in to change notification settings - Fork 32
48 lines (48 loc) · 1.38 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
46
47
48
name: benchmark
on:
push:
branches:
- master
env:
CI: true
permissions:
contents: write
jobs:
benchmark:
name: "Test on Node.js ${{ matrix.node-version }}"
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: yarn install
- name: Build
run: yarn run build
- name: Run Benchmark
run: cd examples/benchmark && node index.js | tee output.txt
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
- name: Store benchmark result
uses: rhysd/github-action-benchmark@v1
with:
name: Secretlint benchmark
tool: 'benchmarkjs'
output-file-path: examples/benchmark/output.txt
github-token: ${{ steps.generate_token.outputs.token }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '200%'
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@azu'