forked from yewstack/yew
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (41 loc) · 1.59 KB
/
post-benchmark.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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@v3
- 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 == '' }}