Put benchmark in seperate file #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Benchmark.Net Example | |
| # TODO use this before merging | |
| #on: | |
| # push: | |
| # branches: | |
| # - master | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| tags: | |
| - "v[0-9]+.[0-9]+.[0-9]+" | |
| pull_request: | |
| branches: | |
| - "**" | |
| permissions: | |
| contents: write | |
| deployments: write | |
| jobs: | |
| benchmark: | |
| name: Run Benchmark.Net benchmark example | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Run benchmark | |
| run: cd tests/DynamoDBGenerator.SourceGenerator.Benchmarks && dotnet run --configuration 'Release' -- --exporters 'JSON' --filter '*' --memory --job 'Default' | |
| - name: Store benchmark result | |
| uses: rhysd/github-action-benchmark@v1 | |
| with: | |
| name: Benchmark.Net Benchmark | |
| tool: 'benchmarkdotnet' | |
| output-file-path: tests/DynamoDBGenerator.SourceGenerator.Benchmarks/BenchmarkDotNet.Artifacts/results/DynamoDBGenerator.SourceGenerator.Benchmarks.Benchmarks.Marshalling.TemporalBenchmarks-report-full-compressed.json | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| auto-push: true | |
| # Show alert with commit comment on detecting possible performance regression | |
| alert-threshold: '200%' | |
| comment-on-alert: true | |
| fail-on-alert: true | |
| alert-comment-cc-users: '@inputfalken' |