-
Notifications
You must be signed in to change notification settings - Fork 246
41 lines (41 loc) · 1.11 KB
/
benchmark.yaml
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
---
name: "Benchmarks"
on: # yamllint disable-line rule:truthy
push:
branches:
- "main"
pull_request:
branches:
- "*"
merge_group:
types:
- "checks_requested"
env:
GO_VERSION: "~1.20.5"
jobs:
go-bench:
name: "Go Benchmark"
runs-on: ["self-hosted", "benchmarks"]
needs: "unit"
steps:
- uses: "actions/checkout@v3"
- uses: "authzed/actions/setup-go@main"
with:
go-version: "${{ env.GO_VERSION }}"
- name: "Benchmark"
run: "go run mage.go test:bench | tee benchmarks.txt"
- name: "Download previous benchmark data"
uses: "actions/cache@v1"
with:
path: "./cache"
key: "${{ runner.os }}-benchmark"
- uses: "benchmark-action/github-action-benchmark@v1"
with:
tool: "go"
output-file-path: "benchmarks.txt"
save-data-file: "${{ github.ref_name == 'main' }}"
external-data-json-path: "./cache/benchmark-data.json"
github-token: "${{ github.token }}"
auto-push: false
comment-on-alert: true
summary-always: true