Skip to content

Commit

Permalink
Upgrade test projects to use net8.0 (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
chtenb authored Aug 27, 2024
1 parent 577b9ff commit 03597fb
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"isRoot": true,
"tools": {
"nunit.consolerunner.netcore": {
"version": "3.15.2",
"version": "3.17.0",
"commands": [
"nunit"
]
}
}
}
}
24 changes: 11 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,41 +53,39 @@ jobs:
- name: Check if code is formatted
run: dotnet format whitespace --verify-no-changes -v diag Rubjerg.Graphviz.NugetTests.sln

- name: Run Unittests Without Coverage (.NET 8)
run: bash run-tests-netcore.sh Rubjerg.Graphviz.Test\Rubjerg.Graphviz.Test.csproj

- name: Run Unittests With Coverage Calculation (.NET 4.8)

run: packages\opencover\4.7.1221\tools\OpenCover.Console.exe -skipautoprops -returntargetcode -register '-target:bash.exe' -targetargs:'nunit-console.sh Rubjerg.Graphviz.Test\bin\x64\Release\net48\Rubjerg.Graphviz.Test.dll' '-filter:+[Rubjerg*]* -[Rubjerg.Graphviz.Test*]*'

- name: Run Unittests With Coverage Calculation (.NET 6)

run: packages\opencover\4.7.1221\tools\OpenCover.Console.exe -skipautoprops -returntargetcode -register '-target:bash.exe' -targetargs:'nunit-console-netcore.sh Rubjerg.Graphviz.Test\bin\x64\Release\net6.0\Rubjerg.Graphviz.Test.dll' '-filter:+[Rubjerg*]* -[Rubjerg.Graphviz.Test*]*'

- name: Upload Coverage data
run: |
echo "C:\msys64\usr\bin" >> $GITHUB_PATH
Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
bash codecov.sh -f "results.xml"
- name: Run Transitive Tests (.NET 8)
run: bash run-tests-netcore.sh Rubjerg.Graphviz.TransitiveTest\Rubjerg.Graphviz.TransitiveTest.csproj

- name: Run Transitive Tests (.NET 4.8)
run: bash nunit-console.sh Rubjerg.Graphviz.TransitiveTest\bin\x64\Release\net48\Rubjerg.Graphviz.TransitiveTest.dll

- name: Run Transitive Tests (.NET 6)
run: bash nunit-console-netcore.sh Rubjerg.Graphviz.TransitiveTest\bin\x64\Release\net6.0\Rubjerg.Graphviz.TransitiveTest.dll

- name: Restore NuGet Packages for Nuget Tests (from local package source)
run: nuget restore Rubjerg.Graphviz.NugetTests.sln

- name: Build Nuget Test Solution
run: msbuild Rubjerg.Graphviz.NugetTests.sln /p:Configuration=Release

- name: Run Nuget Tests (.NET 8)
run: bash run-tests-netcore.sh Rubjerg.Graphviz.NugetTest\Rubjerg.Graphviz.NugetTest.csproj

- name: Run Nuget Tests (.NET 4.8)
run: bash nunit-console.sh Rubjerg.Graphviz.NugetTest\bin\x64\Release\net48\Rubjerg.Graphviz.NugetTest.dll

- name: Run Nuget Tests (.NET 6)
run: bash nunit-console.sh Rubjerg.Graphviz.NugetTest\bin\x64\Release\net6.0\Rubjerg.Graphviz.NugetTest.dll

- name: Run Transitive Nuget Tests (.NET 4.8)
run: bash nunit-console.sh Rubjerg.Graphviz.TransitiveNugetTest\bin\x64\Release\net48\Rubjerg.Graphviz.TransitiveNugetTest.dll

- name: Run Transitive Nuget Tests (.NET 6)
run: bash nunit-console.sh Rubjerg.Graphviz.TransitiveNugetTest\bin\x64\Release\net6.0\Rubjerg.Graphviz.TransitiveNugetTest.dll
- name: Run Transitive Nuget Tests (.NET 8)
run: bash nunit-console.sh Rubjerg.Graphviz.TransitiveNugetTest\bin\x64\Release\net8.0\Rubjerg.Graphviz.TransitiveNugetTest.dll

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworks>net48;net6.0</TargetFrameworks>
<TargetFrameworks>net48;net8.0</TargetFrameworks>
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<Authors>Chiel ten Brinke</Authors>
Expand Down
2 changes: 1 addition & 1 deletion Rubjerg.Graphviz.Test/Rubjerg.Graphviz.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworks>net48;net6.0</TargetFrameworks>
<TargetFrameworks>net48;net8.0</TargetFrameworks>
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<Authors>Chiel ten Brinke</Authors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworks>net48;net6.0</TargetFrameworks>
<TargetFrameworks>net48;net8.0</TargetFrameworks>
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<Authors>Chiel ten Brinke</Authors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworks>net48;net6.0</TargetFrameworks>
<TargetFrameworks>net48;net8.0</TargetFrameworks>
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<Authors>Chiel ten Brinke</Authors>
Expand Down
2 changes: 0 additions & 2 deletions nunit-console-netcore.sh

This file was deleted.

2 changes: 2 additions & 0 deletions run-tests-netcore.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
dotnet test -p:Platform=x64 --no-build -c Release -f net8.0 -v d --filter "Category != Flaky & Category != Slow" "$@"

0 comments on commit 03597fb

Please sign in to comment.