forked from AzureAD/microsoft-identity-web
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (45 loc) · 1.72 KB
/
benchmark-action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Run benchmark
on:
workflow_dispatch: # Allows manual triggering of workflow
push:
branches:
- master
permissions:
# Deployments permission to deploy GitHub pages website
deployments: write
# Contents permission to update benchmark contents in gh-pages branch
contents: write
jobs:
benchmark:
name: Performance regression check
runs-on: ubuntu-latest
env:
AzureAd__ClientCredentials__0__SourceType: "ClientSecret"
AzureAd__ClientCredentials__0__ClientSecret: ${{secrets.ClientSecret}}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
- name: Run benchmark
run: cd benchmark && dotnet run -c release -f net8.0 --filter 'Benchmarks.TokenAcquisitionBenchmark.*' --exporters json
- name: Download previous benchmark data
uses: actions/cache@v4
with:
path: ./cache
key: ${{ runner.os }}-benchmark
- name: Store TokenAcquisitionBenchmark benchmark results
uses: benchmark-action/github-action-benchmark@v1
with:
name: TokenAcquisitionBenchmarks
tool: 'benchmarkdotnet'
output-file-path: benchmark/BenchmarkDotNet.Artifacts/results/Benchmarks.TokenAcquisitionBenchmark-report-full-compressed.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '130%'
comment-on-alert: true
fail-on-alert: true
summary-always: true
gh-pages-branch: gh-pages
benchmark-data-dir-path: benchmarks