-
Notifications
You must be signed in to change notification settings - Fork 475
80 lines (77 loc) · 2.38 KB
/
runtests.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Testsuite
on:
[push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
# os: [windows-latest, ubuntu-latest]
framework: [netcoreapp3.1, net6.0, net462]
steps:
- name: Checkout source
uses: actions/checkout@v2
with:
fetch-depth: 0 # needed for GitVersioning to work
- name: Setup NuGet
uses: NuGet/setup-nuget@v1
- name: Cache NuGet packages
uses: actions/cache@v1
id: cache
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget }}
- name: Setup .NET 3.1 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 3.1.x
include-prerelease: false
- name: Restore NuGet Packages
if: steps.cache.outputs.cache-hit != 'true'
run: |
nuget restore Source/Svg.sln
nuget install NUnit.ConsoleRunner -Version 3.10.0 -OutputDirectory tools
- name: Run tests
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
run: |
dotnet test --framework ${{ matrix.framework }} Tests/Svg.UnitTests/Svg.UnitTests.csproj
benchmark:
runs-on: ${{ matrix.os }}
strategy:
matrix:
benchmark: [SvgDocument, SvgPathBuilder, SvgTransformConverter, CoordinateParser]
os: [windows-latest]
# os: [windows-latest, ubuntu-latest]
framework: [netcoreapp3.1]
steps:
- name: Checkout source
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup NuGet
uses: NuGet/setup-nuget@v1
- name: Cache NuGet packages
uses: actions/cache@v1
id: cache
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-bench }}
- name: Setup .NET 3.1 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 3.1.x
include-prerelease: false
- name: Restore NuGet Packages
if: steps.cache.outputs.cache-hit != 'true'
run: |
nuget restore Source/Svg.sln
- name: Run benchmarks
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
run: |
dotnet run -c Release -f ${{ matrix.framework }} -p Tests/Svg.Benchmark --filter *${{ matrix.benchmark }}*