Skip to content
name: Run performance benchmarks
on:
workflow_dispatch: # Allows manual triggering of workflow
push:
branches:
- main
- pmaytak/perf-benchmark-action
#paths:
# - src/client/Microsoft.Identity.Client/**/*.cs
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: Run performance benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '3.1.426'
- name: Run benchmark
run: cd tests/Microsoft.Identity.Test.Performance && dotnet run -c release -f netcoreapp3.1 --exporters json
- name: Download previous benchmark data
uses: actions/cache@v3
with:
path: ./cache
key: ${{ runner.os }}-benchmark
- name: Store AcquireTokenNoCacheTests result
uses: benchmark-action/github-action-benchmark@v1
with:
name: BenchmarkDotNet Benchmark
tool: 'benchmarkdotnet'
output-file-path: tests/Microsoft.Identity.Test.Performance/BenchmarkDotNet.Artifacts/results/Microsoft.Identity.Test.Performance.AcquireTokenNoCacheTests-report-full-compressed.json
github-token: ${{ secrets.GITHUB_TOKEN }}
# auto-push: true
external-data-json-path: ./cache/benchmark-data.json
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '1%'
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@pmaytak'
summary-always: true