File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -173,3 +173,27 @@ jobs:
173173 # Output to both logs and step summary
174174 cat benchmark-table.txt
175175 cat benchmark-table.txt >> $GITHUB_STEP_SUMMARY
176+ - name : Prepare for benchmark storage
177+ run : |
178+ # Save benchmark results outside the repo before stashing
179+ cp benchmark-results.json /tmp/benchmark-results.json
180+ # Stash changes from make sync to allow branch switching
181+ git stash --include-untracked
182+ # Restore the benchmark results
183+ cp /tmp/benchmark-results.json benchmark-results.json
184+ - name : Store benchmark result
185+ uses : benchmark-action/github-action-benchmark@v1
186+ with :
187+ tool : ' pytest'
188+ output-file-path : benchmark-results.json
189+ # Store benchmark data in gh-pages branch
190+ gh-pages-branch : gh-pages
191+ benchmark-data-dir-path : dev/bench
192+ # Fail if performance regresses by more than 20%
193+ alert-threshold : ' 120%'
194+ fail-on-alert : true
195+ # Comment on PR when regression detected
196+ comment-on-alert : true
197+ github-token : ${{ secrets.GITHUB_TOKEN }}
198+ # Only push to gh-pages on main branch
199+ auto-push : ${{ github.ref == 'refs/heads/main' }}
You can’t perform that action at this time.
0 commit comments