From 3a73acfe6fe3a3d17b0cee49278d75267b7c0c6e Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sat, 13 Dec 2025 01:23:43 +0000 Subject: [PATCH] feat: Simplify benchmark result storage logic and ensure proper handling for PRs --- .github/workflows/benchmark.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index c3adc4dc..8cdc40a9 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -37,22 +37,22 @@ jobs: run: go test -bench=. -benchmem -run='^$' ./... | tee output.txt - name: Store Benchmark Result + # Only store results on pushes to main - PRs just run benchmarks without storage + # This avoids gh-pages branch errors and permission issues on fork PRs + if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: benchmark-action/github-action-benchmark@v1 with: name: Go Benchmark tool: 'go' output-file-path: backend/output.txt github-token: ${{ secrets.GITHUB_TOKEN }} - # Only push results on main branch, not PRs (avoids permission errors on forks) - auto-push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - # Skip fetching gh-pages on PRs to avoid permission errors - skip-fetch-gh-pages: ${{ github.event_name == 'pull_request' }} + auto-push: true # Show alert with commit comment on detection of performance regression # Threshold increased to 175% to account for CI variability alert-threshold: '175%' comment-on-alert: true fail-on-alert: false - # Enable Job Summary for PRs + # Enable Job Summary summary-always: true - name: Run Perf Asserts