Skip to content

Merge pull request #387 from timbray/dependabot/github_actions/action… #586

Merge pull request #387 from timbray/dependabot/github_actions/action…

Merge pull request #387 from timbray/dependabot/github_actions/action… #586

Workflow file for this run

name: Benchmarks
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
benchmark:
name: Benchmarks
strategy:
matrix:
go-version: ["1.22"]
platform: ["ubuntu-latest"]
runs-on: ${{ matrix.platform }}
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Run benchmark
run: go test -benchmem -run="^$" -bench "^Benchmark" . quamina.net/go/quamina | tee output.txt
- name: Download previous benchmark data
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a
with:
path: ./cache
key: ${{ runner.os }}-benchmark
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@d48d326b4ca9ba73ca0cd0d59f108f9e02a381c7
with:
name: Go Benchmark
tool: "go"
github-token: ${{ secrets.GITHUB_TOKEN }}
# Compare results against json from cache
output-file-path: output.txt
external-data-json-path: ./cache/benchmark-data.json
# print job summary in workflow output
summary-always: true
# Alert on regression
alert-threshold: "120%"
fail-on-alert: false
comment-on-alert: true
# Disable github pages, for now.
auto-push: false