Skip to content

Commit

Permalink
Add benchmark to PR workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Stuk committed Jun 23, 2022
1 parent aa67068 commit 3b1f8b7
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/pr.yaml
Expand Up @@ -35,3 +35,24 @@ jobs:
run: npm run lint
- name: Test
run: npm test

- name: Benchmark
run: npm run benchmark | tee benchmark.txt

- name: Download previous benchmark data
uses: actions/cache@v3
with:
path: ./cache
key: ${{ runner.os }}-benchmark

- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'benchmarkjs'
output-file-path: benchmark.txt
external-data-json-path: ./cache/benchmark-data.json
github-token: ${{ secrets.GITHUB_TOKEN }}
alert-threshold: '150%'
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@Stuk'

0 comments on commit 3b1f8b7

Please sign in to comment.