feat: add initial continous benchmarking
[poolifier.git] / .github / workflows / benchmark.yml
1 name: Benchmark
2
3 on:
4 push:
5 branches:
6 - master
7
8 permissions:
9 contents: write
10 deployments: write
11
12 jobs:
13 internal-benchmark:
14 name: Internal benchmark
15 runs-on: ubuntu-latest
16 steps:
17 - name: Checkout
18 uses: actions/checkout@v4
19 - name: Setup pnpm
20 uses: pnpm/action-setup@v2
21 with:
22 version: 8
23 - name: Setup Node.js
24 uses: actions/setup-node@v3
25 with:
26 node-version: '18.x'
27 cache: 'pnpm'
28 - name: Install dependencies
29 run: pnpm install --ignore-scripts
30 - name: Run production benchmark
31 run: pnpm benchmark:prod | tee ./benchmarks/internal/output.txt
32 - name: Store production benchmark result
33 uses: benchmark-action/github-action-benchmark@v1
34 with:
35 name: Internal benchmark
36 tool: 'benchmarkjs'
37 output-file-path: ./benchmarks/internal/output.txt
38 github-token: ${{ secrets.GITHUB_TOKEN }}
39 auto-push: true
40 alert-threshold: '200%'
41 comment-on-alert: true
42 fail-on-alert: true
43 gh-repository: 'github.com/poolifier/benchmark-results'