Benchmark NAPI WIP 1 #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Benchmark JS | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: [opened, synchronize] | |
paths: | |
- '**/*.rs' | |
- 'Cargo.lock' | |
- '.github/workflows/benchmark-js.yml' | |
push: | |
branches: | |
- main | |
- bench-* | |
paths: | |
- '**/*.rs' | |
- 'Cargo.lock' | |
- '.github/workflows/benchmark-js.yml' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
benchmark-js: | |
name: Benchmark JS | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Branch | |
uses: actions/checkout@v4 | |
with: | |
progress: false | |
persist-credentials: false | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install dependencies | |
run: npm install | |
- name: Run benchmarks | |
uses: CodSpeedHQ/action@v2 | |
timeout-minutes: 30 | |
with: | |
run: npm exec vitest bench | |
token: ${{ secrets.CODSPEED_TOKEN }} |