-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (47 loc) · 1.59 KB
/
ci.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
50
51
52
53
54
55
56
name: CI
on:
workflow_dispatch:
pull_request:
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'
- name: Run Tests
run: dotnet test --configuration Release
working-directory: ./Tests
benchmark:
name: Run Benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'
- name: Run benchmark
working-directory: ./Benchmarks
run: dotnet run -c Release --exporters json --filter '*' --memory --join
- name: Get benchmark file name
id: benchmarkfilename
working-directory: ./Benchmarks/BenchmarkDotNet.Artifacts/results
run: |
filePath=$(find . -type f -name 'BenchmarkRun-joined-*-report-full-compressed.json' | rev | cut -d '/' -f1 | rev)
echo $filePath
echo "::set-output name=file::$filePath"
- name: Store benchmark result
uses: rhysd/github-action-benchmark@v1
with:
name: Benchmark.Net Benchmark
tool: 'benchmarkdotnet'
output-file-path: Benchmarks/BenchmarkDotNet.Artifacts/results/${{ steps.benchmarkfilename.outputs.file }}
alert-threshold: '200%'
fail-on-alert: true
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: Benchmark
path: Benchmark/BenchmarkDotNet.Artifacts/results/