diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c6db278de..d40f9de3b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -27,10 +27,15 @@ stages: inputs: command: test projects: $(TestProject) - arguments: --configuration Debug --collect "Code coverage" + arguments: --configuration Debug --collect "XPlat Code Coverage" nobuild: false testRunTitle: 'Debug on Windows' publishTestResults: true + - task: PublishCodeCoverageResults@1 + displayName: 'Publish code coverage' + inputs: + codeCoverageTool: Cobertura + summaryFileLocation: $(Agent.TempDirectory)/*/coverage.cobertura.xml - job: Linux pool: vmImage: ubuntu-latest @@ -48,10 +53,15 @@ stages: inputs: command: test projects: $(TestProject) - arguments: --configuration Debug --collect "Code coverage" + arguments: --configuration Debug --collect "XPlat Code Coverage" nobuild: false testRunTitle: 'Debug on Linux' publishTestResults: true + - task: PublishCodeCoverageResults@1 + displayName: 'Publish code coverage' + inputs: + codeCoverageTool: Cobertura + summaryFileLocation: $(Agent.TempDirectory)/*/coverage.cobertura.xml - job: MacOS pool: vmImage: macOS-latest @@ -69,10 +79,15 @@ stages: inputs: command: test projects: $(TestProject) - arguments: --configuration Debug --collect "Code coverage" + arguments: --configuration Debug --collect "XPlat Code Coverage" nobuild: false testRunTitle: 'Debug on MacOS' publishTestResults: true + - task: PublishCodeCoverageResults@1 + displayName: 'Publish code coverage' + inputs: + codeCoverageTool: Cobertura + summaryFileLocation: $(Agent.TempDirectory)/*/coverage.cobertura.xml - stage: BuildPackages condition: and(succeeded('Tests'), eq(variables.isMain, true)) jobs: diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index d0977f617..8ce0e4022 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -35,5 +35,6 @@ + \ No newline at end of file diff --git a/src/DotNext.Tests/.runsettings b/src/DotNext.Tests/.runsettings index dff5ef6bf..f01c89f44 100644 --- a/src/DotNext.Tests/.runsettings +++ b/src/DotNext.Tests/.runsettings @@ -6,15 +6,11 @@ - + - - - - .*xunit.* - - - + cobertura + ObsoleteAttribute,GeneratedCodeAttribute,CompilerGeneratedAttribute,ExcludeFromCodeCoverageAttribute + false diff --git a/src/DotNext.Tests/DotNext.Tests.csproj b/src/DotNext.Tests/DotNext.Tests.csproj index 8e00182bf..c93922200 100644 --- a/src/DotNext.Tests/DotNext.Tests.csproj +++ b/src/DotNext.Tests/DotNext.Tests.csproj @@ -32,6 +32,10 @@ all runtime; build; native; contentfiles; analyzers + + runtime; build; native; contentfiles; analyzers; buildtransitive + all +