Upgrade test projects to use net8.0 #287
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: CI | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
# https://timheuer.com/blog/building-net-framework-apps-using-github-actions/ | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
runs-on: windows-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- uses: actions/checkout@v1 | |
name: Checkout Code | |
- name: Check if line endings are CRLF | |
run: | | |
bash -c "git grep -rlIP . | xargs unix2dos" | |
echo test | |
git diff --exit-code | |
- name: Add msbuild to PATH | |
uses: microsoft/[email protected] | |
- name: Setup NuGet.exe for use with actions | |
uses: NuGet/[email protected] | |
- name: Restore Tools | |
run: dotnet tool restore | |
- name: Restore NuGet Packages | |
run: nuget restore Rubjerg.Graphviz.sln | |
- name: Build App | |
run: msbuild Rubjerg.Graphviz.sln /p:Configuration=Release | |
- name: Check if README is up-to-date | |
run: git diff --exit-code -- README.md | |
- name: Check if code is formatted | |
run: dotnet format whitespace --verify-no-changes -v diag Rubjerg.Graphviz.sln | |
- 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: dotnet test -p:Platform=x64 --no-build -c Release -f net8.0 -v d --filter "Category != Flaky & Category != Slow" 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: 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: dotnet test -p:Platform=x64 --no-build -c Release -f net8.0 -v d --filter "Category != Flaky & Category != Slow" 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: 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: dotnet test -p:Platform=x64 --no-build -c Release -f net8.0 -v d --filter "Category != Flaky & Category != Slow" 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 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 8) | |
run: bash nunit-console.sh Rubjerg.Graphviz.TransitiveNugetTest\bin\x64\Release\net8.0\Rubjerg.Graphviz.TransitiveNugetTest.dll | |