Skip to content

Added shared library for test application: Svg.Tests.Common (#1136) #523

Added shared library for test application: Svg.Tests.Common (#1136)

Added shared library for test application: Svg.Tests.Common (#1136) #523

Workflow file for this run

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 }}*