-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.38 KB
/
Copy pathbench.yml
File metadata and controls
49 lines (42 loc) · 1.38 KB
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
48
49
name: Benchmarks
# Publish-only: runs benchmarks, pushes results to the gh-pages branch where
# benchmark-action renders a chart. Never gates a PR merge. Annotates points
# that regressed by 50%+ but does not fail the workflow.
on:
push:
branches: [main]
schedule:
- cron: '0 6 * * *' # daily at 06:00 UTC
workflow_dispatch:
# Needed by benchmark-action to push to gh-pages.
permissions:
contents: write
deployments: write
jobs:
bench:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.23'
# -count=5 averages over five runs to dampen shared-runner noise.
# -run='^$' skips tests so only benchmarks execute.
- name: Run benchmarks
run: |
go test -bench=. -benchmem -count=5 -run='^$' \
./tests/benchmarks/... | tee output.txt
- name: Publish chart
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'go'
output-file-path: output.txt
github-token: ${{ secrets.GITHUB_TOKEN }}
gh-pages-branch: gh-pages
benchmark-data-dir-path: 'dev/bench'
auto-push: true
# Annotate 1.5x regressions but never fail or comment.
alert-threshold: '150%'
fail-on-alert: false
comment-on-alert: false
summary-always: true