2022-02-18 20:52:52 +01:00
|
|
|
name: Benchmark
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
env:
|
2023-09-06 11:06:58 -07:00
|
|
|
DEFAULT_GO_VERSION: "~1.21.1"
|
2022-02-18 20:52:52 +01:00
|
|
|
jobs:
|
|
|
|
benchmark:
|
|
|
|
name: Benchmarks
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-04 10:15:56 -08:00
|
|
|
- uses: actions/checkout@v3
|
2023-03-19 07:47:08 -07:00
|
|
|
- uses: actions/setup-go@v4
|
2022-02-18 20:52:52 +01: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 16:18:20 -04:00
|
|
|
uses: actions/cache@v3
|
2022-02-18 20:52:52 +01:00
|
|
|
with:
|
|
|
|
path: ./benchmarks
|
|
|
|
key: ${{ runner.os }}-benchmark
|
|
|
|
- name: Store benchmarks result
|
2023-07-11 08:00:04 -07:00
|
|
|
uses: benchmark-action/github-action-benchmark@v1.18.0
|
2022-02-18 20:52:52 +01:00
|
|
|
with:
|
|
|
|
name: Benchmarks
|
|
|
|
tool: 'go'
|
|
|
|
output-file-path: output.txt
|
|
|
|
external-data-json-path: ./benchmarks/data.json
|
|
|
|
auto-push: false
|
2022-04-20 12:32:46 -06:00
|
|
|
fail-on-alert: false
|
2022-03-04 20:32:49 +01:00
|
|
|
alert-threshold: "400%"
|