forked from svg-net/SVG
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (67 loc) · 2.1 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
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: [netcoreapp2.1, netcoreapp3.1, net5.0, net452, net461]
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: 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: 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 }}*