Skip to content

Commit

Permalink
chore: add benchmark action
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyMakkison committed Jun 15, 2023
1 parent 85347e4 commit b01d282
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Benchmark
on:
push:
branches:
- main

permissions:
contents: write
deployments: write

jobs:
benchmark:
name: Run Benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3.2.0
with:
global-json-file: global.json
- name: Run benchmark
working-directory: "benchmarks/Riok.Mapperly.Benchmarks"
run: dotnet run --exporters json --filter '*' --configuration Release

- name: Store benchmark result
uses: rhysd/github-action-benchmark@v1
with:
name: Benchmark.Net Benchmark
tool: "benchmarkdotnet"
output-file-path: "benchmarks/Riok.Mapperly.Benchmarks/BenchmarkDotNet.Artifacts/results/Benchmark-report-full-compressed.json"
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: "150%"
comment-on-alert: true
fail-on-alert: true

0 comments on commit b01d282

Please sign in to comment.