-
-
Notifications
You must be signed in to change notification settings - Fork 19
45 lines (43 loc) · 1.27 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
name: benchmark
on:
- push
- pull_request
jobs:
node:
name: node
strategy:
matrix:
node:
- 12
- 14
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: npm install -g yarn
- run: yarn install --frozen-lockfile
- run: yarn run --silent benchmark | tee node-${{ matrix.node }}.txt
env:
ENVIRONMENT: node-${{ matrix.node }}
- uses: actions/upload-artifact@v2
with:
name: node-${{ matrix.node }}.txt
path: node-${{ matrix.node }}.txt
- if: github.ref == 'refs/heads/master'
uses: rhysd/github-action-benchmark@v1
with:
tool: 'benchmarkjs'
output-file-path: node-${{ matrix.node }}.txt
benchmark-data-dir-path: benchmark
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true