Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try fixing the post-comment benchmark action #3045

Merged
merged 2 commits into from
Dec 17, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 == '' }}