2022-02-18 21:52:52 +02:00
|
|
|
name: Benchmark
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
env:
|
2023-10-12 08:24:09 +02:00
|
|
|
DEFAULT_GO_VERSION: "~1.21.3"
|
2022-02-18 21:52:52 +02:00
|
|
|
jobs:
|
|
|
|
benchmark:
|
|
|
|
name: Benchmarks
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-10 16:55:55 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-03-19 16:47:08 +02:00
|
|
|
- uses: actions/setup-go@v4
|
2022-02-18 21:52:52 +02:00
|
|
|
with:
|
|
|
|
go-version: ${{ env.DEFAULT_GO_VERSION }}
|
|
|
|
- name: Run benchmarks
|
|
|
|
run: make test-bench | tee output.txt
|
|
|
|
- name: Download previous benchmark data
|
2022-03-21 22:18:20 +02:00
|
|
|
uses: actions/cache@v3
|
2022-02-18 21:52:52 +02:00
|
|
|
with:
|
|
|
|
path: ./benchmarks
|
|
|
|
key: ${{ runner.os }}-benchmark
|
|
|
|
- name: Store benchmarks result
|
2023-07-11 17:00:04 +02:00
|
|
|
uses: benchmark-action/github-action-benchmark@v1.18.0
|
2022-02-18 21:52:52 +02:00
|
|
|
with:
|
|
|
|
name: Benchmarks
|
|
|
|
tool: 'go'
|
|
|
|
output-file-path: output.txt
|
|
|
|
external-data-json-path: ./benchmarks/data.json
|
|
|
|
auto-push: false
|
2022-04-20 20:32:46 +02:00
|
|
|
fail-on-alert: false
|
2022-03-04 21:32:49 +02:00
|
|
|
alert-threshold: "400%"
|