-
Notifications
You must be signed in to change notification settings - Fork 4
47 lines (44 loc) · 1.37 KB
/
benchmark_master.yaml
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
---
name: Benchmark Master
on:
push:
branches:
- master
jobs:
benchmark:
name: Run JavaScript benchmark
runs-on: ubuntu-latest
steps:
- uses: mskelton/setup-yarn@v3
with:
node-version: lts/*
flags: --immutable-cache
cache: yarn
- name: Run benchmark
run: yarn benchmark
- name: Download previous benchmark data
uses: actions/cache@v4
with:
path: ./cache
key: ${{ runner.os }}-benchmark
- name: Compare with previous commit
uses: benchmark-action/github-action-benchmark@v1
with:
name: "Calculate"
tool: "benchmarkjs"
output-file-path: benchmark/output.txt
external-data-json-path: ./cache/benchmark-data.json
# Access token to deploy GitHub Pages branch
github-token: ${{ secrets.GITHUB_TOKEN }}
# Push and deploy GitHub pages branch automatically
auto-push: false
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: "Calculate"
tool: "benchmarkjs"
output-file-path: benchmark/output.txt
# Access token to deploy GitHub Pages branch
github-token: ${{ secrets.GITHUB_TOKEN }}
# Push and deploy GitHub pages branch automatically
auto-push: true