perf: Benchmark nodes-base
#5
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 nodes-base | |
on: | |
pull_request: | |
paths: | |
- 'packages/core/**' | |
- 'packages/workflow/**' | |
- 'packages/nodes-base/**' | |
workflow_dispatch: | |
jobs: | |
benchmark: | |
name: Benchmark | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- run: corepack enable | |
- uses: actions/[email protected] | |
with: | |
node-version: 18.x | |
cache: pnpm | |
- run: pnpm install --frozen-lockfile | |
- name: Build | |
if: ${{ inputs.cacheKey == '' }} | |
run: pnpm build:backend | |
- name: Restore cached build artifacts | |
if: ${{ inputs.cacheKey != '' }} | |
uses: actions/cache/[email protected] | |
with: | |
path: ./packages/**/dist | |
key: ${{ inputs.cacheKey }} | |
- name: Build benchmarks | |
working-directory: packages/nodes-base | |
run: pnpm benchmark:build | |
- name: Benchmark nodes-base | |
uses: CodSpeedHQ/action@v2 | |
with: | |
working-directory: packages/nodes-base | |
run: pnpm benchmark:run |