mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-01-24 03:47:19 +02:00
b761af75f5
It enables the job summary for triggered PRs. (it doesn't create a comment in PRs) Example: https://github.com/benchmark-action/github-action-benchmark/issues/159#issuecomment-1871746703 --------- Co-authored-by: Robert Pająk <pellared@hotmail.com>
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
name: Benchmark
|
|
on:
|
|
push:
|
|
tags:
|
|
- v1.*
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
DEFAULT_GO_VERSION: "~1.22.5"
|
|
jobs:
|
|
benchmark:
|
|
name: Benchmarks
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ env.DEFAULT_GO_VERSION }}
|
|
check-latest: true
|
|
cache-dependency-path: "**/go.sum"
|
|
- name: Run benchmarks
|
|
run: make benchmark | tee output.txt
|
|
- name: Download previous benchmark data
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ./benchmarks
|
|
key: ${{ runner.os }}-benchmark
|
|
- name: Store benchmarks result
|
|
uses: benchmark-action/github-action-benchmark@v1.20.3
|
|
with:
|
|
name: Benchmarks
|
|
tool: 'go'
|
|
output-file-path: output.txt
|
|
external-data-json-path: ./benchmarks/data.json
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
gh-pages-branch: benchmarks
|
|
fail-on-alert: true
|
|
alert-threshold: "400%"
|
|
# Add benchmark summary to GitHub workflow run report
|
|
summary-always: true
|