-
Notifications
You must be signed in to change notification settings - Fork 63
41 lines (34 loc) · 1.16 KB
/
publish-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: "Trigger Site Rebuild on a CRON Schedule"
on:
schedule:
# runs at 02:00 every day, UTC
- cron: "0 2 * * *"
env:
GO_VERSION: 1.19.3
jobs:
benchmark-publish:
name: Run Benchmark
if: github.repository == 'open-feature/flagd'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Setup go
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Workspace init
run: make workspace-init
- name: Run benchmark
run: set -o pipefail; go test -bench=Bench -short -benchtime=5s -benchmem ./core/... | tee output.txt
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Go Benchmark
tool: "go"
output-file-path: output.txt
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: "130%"
comment-on-alert: true
fail-on-alert: false