Skip to content

Restructure benchmarks and use Vitest's native comparison #11

Restructure benchmarks and use Vitest's native comparison

Restructure benchmarks and use Vitest's native comparison #11

Workflow file for this run

name: performance
on:
pull_request:
paths:
- 'lib/**'
- 'test/benchmark/**'
workflow_dispatch:
jobs:
benchmark:
runs-on: ubuntu-latest
name: Performance Benchmarks
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 20.x
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run benchmarks
id: bench
run: |
echo "Running performance benchmarks..."
pnpm run bench 2>&1 | tee bench-output.txt
- name: Generate benchmark summary
if: always()
run: |
echo "## 📊 Performance Benchmark Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
cat bench-output.txt >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
- name: Check for regressions (informational)
run: pnpm run bench:check || echo "::warning::Performance regressions detected. Review benchmark results."
continue-on-error: true