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,21 @@ jobs:
173173 # Output to both logs and step summary
174174 cat benchmark-table.txt
175175 cat benchmark-table.txt >> $GITHUB_STEP_SUMMARY
176+ - name : Stash changes before benchmark storage
177+ run : git stash --include-untracked
178+ - name : Store benchmark result
179+ uses : benchmark-action/github-action-benchmark@v1
180+ with :
181+ tool : ' pytest'
182+ output-file-path : benchmark-results.json
183+ # Store benchmark data in gh-pages branch
184+ gh-pages-branch : gh-pages
185+ benchmark-data-dir-path : dev/bench
186+ # Fail if performance regresses by more than 20%
187+ alert-threshold : ' 120%'
188+ fail-on-alert : true
189+ # Comment on PR when regression detected
190+ comment-on-alert : true
191+ github-token : ${{ secrets.GITHUB_TOKEN }}
192+ # Only push to gh-pages on main branch
193+ auto-push : ${{ github.ref == 'refs/heads/main' }}
You can’t perform that action at this time.
0 commit comments