Conversation
|
Looks like the Microsoft.CodeAnalysis assembly tries to load SQLite and fails. But there is way to much output from normal succeeding tests. |
| <PropertyGroup> | ||
| <RootNamespace>NUnit.Analyzers.Tests</RootNamespace> | ||
| <TargetFrameworks>net6.0;net462</TargetFrameworks> | ||
| <TargetFramework>net6.0</TargetFramework> |
There was a problem hiding this comment.
This needs to be done conditionally on OS. We still want to test .net framework on Windows
There was a problem hiding this comment.
I agree with your suggestion.
Therefore, I changed only ci.yml like this.
552b72c
There was a problem hiding this comment.
It can test .NET and .NET Framework on windows, and .NET test on unix.
|
I'm currently traveling and only have access to my phone. |
| dotnet tool install --global dotnet-coverage | ||
| dotnet test --collect:"XPlat Code Coverage" -f net6.0 ./src/nunit.analyzers.tests/ | ||
| dotnet-coverage merge -o merged.cobertura.xml -f cobertura -r coverage.cobertura.xml |
There was a problem hiding this comment.
There is no need for the coverlet nuget package. Dotnet can output cobertura natively..
You can call it like: dotnet test --collect:"Code Coverage;Format=Cobertura"
| <PackageReference Include="coverlet.collector" Version="3.2.0"> | ||
| <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
| <PrivateAssets>all</PrivateAssets> | ||
| </PackageReference> |
| coverage: | ||
| paths: | ||
| - merged.covertura.xml | ||
|
|
||
| codeToTestRatio: | ||
| code: # files to count as "Code" | ||
| - 'src/nunit.analyzers/**/*.cs' | ||
| test: # files to count as "Test" | ||
| - 'src/nunit.analyzers.tests/**/*.cs' | ||
|
|
||
| comment: | ||
| if: is_pull_request | ||
|
|
||
| report: | ||
| if: is_default_branch | ||
| datastores: | ||
| - artifact://${GITHUB_REPOSITORY} | ||
|
|
||
| diff: | ||
| datastores: | ||
| - artifact://${GITHUB_REPOSITORY} |
There was a problem hiding this comment.
This needs align with the nunit changes to use coverlet.
| - name: Post Coverage | ||
| uses: k1LoW/octocov-action@v0 | ||
| if: runner.os == 'Linux' |
There was a problem hiding this comment.
This needs align with the nunit/nunit#4286 to use coverlet.
On Windows, NET Framework and .NET6 is tested on CI.
.NET6 testing is now done in CI on Linux and Mac.