name: CodSpeed benchmarks on: push: paths: - "external/builder/**" - "package-lock.json" - "src/**" - "test/benchmarks/**" - "web/**" - ".github/workflows/codspeed.yml" branches: - master pull_request: paths: - "external/builder/**" - "package-lock.json" - "src/**" - "test/benchmarks/**" - "web/**" - ".github/workflows/codspeed.yml" branches: - master workflow_dispatch: permissions: contents: read jobs: benchmarks: name: Run benchmarks runs-on: codspeed-macro-arm64-graviton-ubuntu-22-04 permissions: contents: read id-token: write # Required for OIDC authentication with CodSpeed strategy: fail-fast: false matrix: node-version: [lts/*] steps: - name: Checkout repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: ${{ matrix.node-version }} cache: "npm" - name: Install dependencies run: npm ci - name: Run benchmarks uses: CodSpeedHQ/action@af75f77f17a054769abefaa42fe8dc2975469b5f # v5.6.3 with: mode: walltime run: npx vitest bench --run --config test/benchmarks/vitest.config.mjs