Try fixing the post-comment benchmark action (#3045)

* Try fixing the post comment benchmark action

Store the complete event in PR_INFO
Checkout repo for github-action-benchmark

* add missing string escape
This commit is contained in:
WorldSEnder 2022-12-17 10:18:56 +00:00 committed by GitHub
parent d14fcd2e2d
commit 9d005432c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 5 deletions

View File

@ -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

View File

@ -18,12 +18,16 @@ 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
@ -31,12 +35,13 @@ jobs:
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 == '' }}