Skip to content

ci: Add CodSpeed benchmark tracking to CI pipeline#2100

Draft
everettbu wants to merge 2 commits into
masterfrom
shortstacked/codspeed-research
Draft

ci: Add CodSpeed benchmark tracking to CI pipeline#2100
everettbu wants to merge 2 commits into
masterfrom
shortstacked/codspeed-research

Conversation

@everettbu

Copy link
Copy Markdown

Mirror of n8n-io/n8n#26156
Original author: shortstacked


Summary

  • Integrate CodSpeed for hardware-independent benchmark regression detection
  • Uses CPU instruction counting (valgrind/perf) instead of wall-time for stable results across CI runners
  • Wired into ci-filter system: triggers on changes to packages/testing/performance/**, packages/workflow/src/**
  • Runs on both PRs (filtered) and master (every push)

Changes

  • Add @codspeed`/vitest-plugin` to @n8n/performance package (vitest bumped to ^3.2.0 for this package only)
  • Add test-bench-codspeed-reusable.yml reusable workflow
  • Add bench filter + job to ci-pull-requests.yml
  • Add bench job to ci-master.yml

Note

  • continue-on-error: true is set on the CodSpeed step until the CodSpeed app is approved and the repo is connected
  • CodSpeed plugin is gated behind process.env.CI — it replaces the vitest benchmark runner entirely and doesn't fall back gracefully locally (crashes on git worktrees)
  • No token/secret needed for public repos (uses OIDC)

Test plan

  • Local benchmarks verified passing (pnpm --filter=@n8n/performance bench)
  • Verify CI workflow triggers on PR
  • Connect CodSpeed app and remove continue-on-error

🤖 Generated with Claude Code

shortstacked and others added 2 commits February 23, 2026 22:50
Integrate CodSpeed for hardware-independent benchmark regression
detection on PRs and master. Uses CPU instruction counting instead
of wall-time for stable results across CI runners.

- Add @codspeed/vitest-plugin to performance package (vitest ^3.2.0)
- Add reusable workflow (test-bench-codspeed-reusable.yml)
- Wire into ci-filter with bench filter (perf + workflow/src paths)
- Add bench job to ci-pull-requests.yml and ci-master.yml
- continue-on-error until CodSpeed app is approved

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CodSpeed Action v4 requires explicit mode. Use walltime for
compatibility with standard CI runners.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@everettbu everettbu added the n8n team Authored by the n8n team label Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

n8n team Authored by the n8n team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants