-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (38 loc) · 1.29 KB
/
benchmarking.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
name: Continuous Benchmarking
on:
push:
branches: [ "main" ]
permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Setup Go 📦
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Run benchmark ⏱️
run: go test -run '^$' -bench . -benchtime 10s ./... | tee output.txt
- name: Publish benchmark result to gh-pages 📰
uses: benchmark-action/github-action-benchmark@v1
with:
# What benchmark tool the output.txt came from
tool: 'go'
# Where the output from the benchmark tool is stored
output-file-path: output.txt
# Workflow will fail when an alert happens
fail-on-alert: true
# Enable Job Summary for PRs
summary-always: true
# Don't automatically push the GH Pages branch
auto-push: true
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Enable alert commit comment
comment-on-alert: true