perf(core): Introduce backend performance benchmarking #15
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: Benchmarks | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
paths: | |
- 'packages/cli/**' | |
- 'packages/core/**' | |
- 'packages/workflow/**' | |
workflow_dispatch: | |
jobs: | |
benchmarks: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
repository: n8n-io/n8n | |
ref: ${{ inputs.ref }} | |
- run: corepack enable | |
- name: Use Node.js ${{ inputs.nodeVersion }} | |
uses: actions/[email protected] | |
with: | |
node-version: ${{ inputs.nodeVersion }} | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Build | |
if: ${{ inputs.cacheKey == '' }} | |
run: pnpm build | |
- name: Restore cached build artifacts | |
if: ${{ inputs.cacheKey != '' }} | |
uses: actions/cache/[email protected] | |
with: | |
path: ./packages/**/dist | |
key: ${{ inputs.cacheKey }} | |
- name: Benchmark | |
uses: CodSpeedHQ/action@v2 | |
with: | |
run: pnpm benchmark |