cd5ff85d8f1285ee789d0ad308594ab9694e9707
[poolifier.git] / .github / workflows / internal-benchmark.yml
1 name: Internal benchmark
2
3 on:
4 workflow_dispatch:
5 push:
6 branches:
7 - master
8
9 jobs:
10 internal-benchmark:
11 if: github.repository == 'poolifier/poolifier'
12 runs-on:
13 group: default
14 labels: [self-hosted, internal-benchmark]
15 env:
16 BENCHER_PROJECT: poolifier
17 BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }}
18 BENCHER_ADAPTER: js_benchmark
19 BENCHER_TESTBED: self-hosted
20 steps:
21 - name: Checkout
22 uses: actions/checkout@v4
23 - name: Setup pnpm
24 uses: pnpm/action-setup@v3
25 with:
26 version: 8
27 - name: Setup Node.js
28 uses: actions/setup-node@v4
29 with:
30 node-version: '20.x'
31 check-latest: true
32 cache: 'pnpm'
33 - name: Install dependencies
34 run: pnpm install --ignore-scripts --frozen-lockfile
35 - uses: bencherdev/bencher@main
36 - name: Run production benchmark
37 run: |
38 bencher run \
39 --if-branch "$GITHUB_REF_NAME" \
40 --else-if-branch "$GITHUB_BASE_REF" \
41 --else-if-branch master \
42 --hash "$GITHUB_SHA" \
43 --err \
44 --github-actions ${{ secrets.GITHUB_TOKEN }} \
45 "pnpm benchmark:prod"