| 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: json |
| 19 | BENCHER_TESTBED: self-hosted |
| 20 | steps: |
| 21 | - name: Checkout |
| 22 | uses: actions/checkout@v4 |
| 23 | - name: Setup pnpm |
| 24 | uses: pnpm/action-setup@v4 |
| 25 | - name: Setup Node.js |
| 26 | uses: actions/setup-node@v4 |
| 27 | with: |
| 28 | node-version: 20.x |
| 29 | check-latest: true |
| 30 | cache: 'pnpm' |
| 31 | - name: Install dependencies |
| 32 | run: pnpm install --ignore-scripts --frozen-lockfile |
| 33 | - uses: bencherdev/bencher@main |
| 34 | - name: Run production benchmark |
| 35 | run: | |
| 36 | bencher run \ |
| 37 | --if-branch "$GITHUB_REF_NAME" \ |
| 38 | --else-if-branch "$GITHUB_BASE_REF" \ |
| 39 | --else-if-branch master \ |
| 40 | --hash "$GITHUB_SHA" \ |
| 41 | --file benchmark-report.json \ |
| 42 | --err \ |
| 43 | --github-actions ${{ secrets.GITHUB_TOKEN }} \ |
| 44 | "pnpm benchmark:tatami-ng:prod" |