Skip to content

Commit

Permalink
Try fixing the post comment benchmark action
Browse files Browse the repository at this point in the history
Store the complete event in PR_INFO
Checkout repo for github-action-benchmark
  • Loading branch information
WorldSEnder committed Dec 17, 2022
1 parent 698bd56 commit 1a5e81e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
run: |
mkdir artifacts/
jq -s . js-framework-benchmark/webdriver-ts/results/*.json | cargo run --manifest-path yew/tools/Cargo.toml --release -p process-benchmark-results > artifacts/results.json
echo ${{ github.event.number }} > artifacts/PR_INFO
echo ${{ toJSON(github.event) }} > artifacts/PR_INFO
- name: Upload result artifacts
uses: actions/upload-artifact@v3
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/post-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,30 @@ jobs:
workflow: benchmark.yml
run_id: ${{ github.event.workflow_run.id }}
name: results
path: ./artifacts

# Checkout repo for the github-action-benchmark action
- uses: actions/checkout@v2

- name: Test for PR
uses: mathiasvr/command-output@v1
id: test-pr
with:
run: cat PR_INFO
run: cat artifacts/PR_INFO

# gh-pages branch is updated and pushed automatically with extracted benchmark data
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: "Yew master branch benchmarks (Lower is better)"
tool: "customSmallerIsBetter"
output-file-path: results.json
output-file-path: artifacts/results.json
gh-pages-branch: "gh-pages"
# Access token to deploy GitHub Pages branch
github-token: ${{ secrets.GITHUB_TOKEN }}
# Push and deploy GitHub pages branch automatically
alert-threshold: "200%"
alert-comment-cc-users: "@yewstack/yew"
auto-push: true
save-data-file: ${{ steps.test-pr.outputs.stdout == "" }}
# Only push when this is a non-pr commit that has been benchmarked, i.e. master
auto-push: ${{ fromJSON(steps.test-pr.outputs.stdout).number == '' }}
save-data-file: ${{ fromJSON(steps.test-pr.outputs.stdout).number == '' }}

0 comments on commit 1a5e81e

Please sign in to comment.