yew/.github/workflows/post-benchmark.yml
dependabot[bot] 443dba3cf8
Bump actions/checkout from 3 to 4 (#3433)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 19:12:26 +09:00

48 lines
1.6 KiB
YAML

name: "Post benchmark results"
on:
workflow_run:
workflows: ["Benchmark"]
types:
- completed
jobs:
post-benchmark-results:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'
steps:
# Checkout repo for the github-action-benchmark action
- uses: actions/checkout@v4
- name: Download result artifacts
uses: Legit-Labs/action-download-artifact@v2
with:
workflow: benchmark.yml
run_id: ${{ github.event.workflow_run.id }}
name: results
path: ./artifacts
- name: Test for PR
uses: mathiasvr/command-output@v1
id: test-pr
with:
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: 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"
# 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 == '' }}