From afd8687d0ae64f8f49320a7481a9e07b00a8b84b Mon Sep 17 00:00:00 2001 From: Leszek 'skolima' Ciesielski Date: Tue, 29 Sep 2020 14:13:18 +0200 Subject: [PATCH 1/3] Switch coverlet.msbuild to coverlet.collector We've started hitting https://github.com/coverlet-coverage/coverlet/issues/894 and this is the recommended solution --- .azure-build.yml | 2 +- .../NuKeeper.Abstractions.Tests.csproj | 4 ++-- NuKeeper.Git.Tests/NuKeeper.Git.Tests.csproj | 4 ++++ NuKeeper.GitHub.Tests/NuKeeper.GitHub.Tests.csproj | 4 ++-- NuKeeper.Gitea.Tests/NuKeeper.Gitea.Tests.csproj | 4 ++-- NuKeeper.Gitlab.Tests/NuKeeper.Gitlab.Tests.csproj | 4 ++-- NuKeeper.Inspection.Tests/NuKeeper.Inspection.Tests.csproj | 4 ++-- NuKeeper.Integration.Tests/NuKeeper.Integration.Tests.csproj | 4 ++-- NuKeeper.Tests/NuKeeper.Tests.csproj | 4 ++-- NuKeeper.Update.Tests/NuKeeper.Update.Tests.csproj | 4 ++-- Nukeeper.AzureDevOps.Tests/Nukeeper.AzureDevOps.Tests.csproj | 4 ++-- 11 files changed, 23 insertions(+), 19 deletions(-) diff --git a/.azure-build.yml b/.azure-build.yml index a81e64fb0..eca48a209 100644 --- a/.azure-build.yml +++ b/.azure-build.yml @@ -36,7 +36,7 @@ steps: inputs: command: test projects: 'NuKeeper.sln' - arguments: '--configuration $(BuildConfiguration) /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura' + arguments: '--collect:"XPlat Code Coverage" --configuration $(BuildConfiguration)' nobuild: true - script: | diff --git a/NuKeeper.Abstractions.Tests/NuKeeper.Abstractions.Tests.csproj b/NuKeeper.Abstractions.Tests/NuKeeper.Abstractions.Tests.csproj index 6c263e3ab..78c7119b1 100644 --- a/NuKeeper.Abstractions.Tests/NuKeeper.Abstractions.Tests.csproj +++ b/NuKeeper.Abstractions.Tests/NuKeeper.Abstractions.Tests.csproj @@ -10,9 +10,9 @@ - - runtime; build; native; contentfiles; analyzers + all + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/NuKeeper.Git.Tests/NuKeeper.Git.Tests.csproj b/NuKeeper.Git.Tests/NuKeeper.Git.Tests.csproj index fb7f4714b..3d4fa65ca 100644 --- a/NuKeeper.Git.Tests/NuKeeper.Git.Tests.csproj +++ b/NuKeeper.Git.Tests/NuKeeper.Git.Tests.csproj @@ -15,6 +15,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/NuKeeper.GitHub.Tests/NuKeeper.GitHub.Tests.csproj b/NuKeeper.GitHub.Tests/NuKeeper.GitHub.Tests.csproj index 194eb3d6a..a1db887b2 100644 --- a/NuKeeper.GitHub.Tests/NuKeeper.GitHub.Tests.csproj +++ b/NuKeeper.GitHub.Tests/NuKeeper.GitHub.Tests.csproj @@ -9,9 +9,9 @@ - - runtime; build; native; contentfiles; analyzers + all + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/NuKeeper.Gitea.Tests/NuKeeper.Gitea.Tests.csproj b/NuKeeper.Gitea.Tests/NuKeeper.Gitea.Tests.csproj index 8157f95c2..129d4fddc 100644 --- a/NuKeeper.Gitea.Tests/NuKeeper.Gitea.Tests.csproj +++ b/NuKeeper.Gitea.Tests/NuKeeper.Gitea.Tests.csproj @@ -9,9 +9,9 @@ - - runtime; build; native; contentfiles; analyzers + all + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/NuKeeper.Gitlab.Tests/NuKeeper.Gitlab.Tests.csproj b/NuKeeper.Gitlab.Tests/NuKeeper.Gitlab.Tests.csproj index 33dd0e1e4..33ffc0193 100644 --- a/NuKeeper.Gitlab.Tests/NuKeeper.Gitlab.Tests.csproj +++ b/NuKeeper.Gitlab.Tests/NuKeeper.Gitlab.Tests.csproj @@ -11,9 +11,9 @@ - - runtime; build; native; contentfiles; analyzers + all + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/NuKeeper.Inspection.Tests/NuKeeper.Inspection.Tests.csproj b/NuKeeper.Inspection.Tests/NuKeeper.Inspection.Tests.csproj index f43a6e50a..3a2d067fb 100644 --- a/NuKeeper.Inspection.Tests/NuKeeper.Inspection.Tests.csproj +++ b/NuKeeper.Inspection.Tests/NuKeeper.Inspection.Tests.csproj @@ -7,9 +7,9 @@ ..\CodeAnalysisRulesForTests.ruleset - - runtime; build; native; contentfiles; analyzers + all + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/NuKeeper.Integration.Tests/NuKeeper.Integration.Tests.csproj b/NuKeeper.Integration.Tests/NuKeeper.Integration.Tests.csproj index 94b9ccd61..8c5dd76c5 100644 --- a/NuKeeper.Integration.Tests/NuKeeper.Integration.Tests.csproj +++ b/NuKeeper.Integration.Tests/NuKeeper.Integration.Tests.csproj @@ -4,9 +4,9 @@ ..\CodeAnalysisRulesForTests.ruleset - - runtime; build; native; contentfiles; analyzers + all + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/NuKeeper.Tests/NuKeeper.Tests.csproj b/NuKeeper.Tests/NuKeeper.Tests.csproj index 8c20820ec..e1e149e91 100644 --- a/NuKeeper.Tests/NuKeeper.Tests.csproj +++ b/NuKeeper.Tests/NuKeeper.Tests.csproj @@ -4,9 +4,9 @@ ..\CodeAnalysisRulesForTests.ruleset - - runtime; build; native; contentfiles; analyzers + all + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/NuKeeper.Update.Tests/NuKeeper.Update.Tests.csproj b/NuKeeper.Update.Tests/NuKeeper.Update.Tests.csproj index ae6c67d0b..87cf7798f 100644 --- a/NuKeeper.Update.Tests/NuKeeper.Update.Tests.csproj +++ b/NuKeeper.Update.Tests/NuKeeper.Update.Tests.csproj @@ -7,9 +7,9 @@ ..\CodeAnalysisRulesForTests.ruleset - - runtime; build; native; contentfiles; analyzers + all + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Nukeeper.AzureDevOps.Tests/Nukeeper.AzureDevOps.Tests.csproj b/Nukeeper.AzureDevOps.Tests/Nukeeper.AzureDevOps.Tests.csproj index 0db095181..a4b1f9ce4 100644 --- a/Nukeeper.AzureDevOps.Tests/Nukeeper.AzureDevOps.Tests.csproj +++ b/Nukeeper.AzureDevOps.Tests/Nukeeper.AzureDevOps.Tests.csproj @@ -10,9 +10,9 @@ - - runtime; build; native; contentfiles; analyzers + all + runtime; build; native; contentfiles; analyzers; buildtransitive From 97c8567ee6e54e3edade001f583b36fd2f591461 Mon Sep 17 00:00:00 2001 From: Leszek 'skolima' Ciesielski Date: Tue, 29 Sep 2020 14:28:12 +0200 Subject: [PATCH 2/3] This collector generates results in different path --- .azure-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-build.yml b/.azure-build.yml index eca48a209..1ad7f619f 100644 --- a/.azure-build.yml +++ b/.azure-build.yml @@ -41,7 +41,7 @@ steps: - script: | dotnet tool install -g dotnet-reportgenerator-globaltool - reportgenerator -reports:$(Build.SourcesDirectory)/**/coverage.cobertura.xml -targetdir:$(Build.SourcesDirectory)/CodeCoverage -reporttypes:HtmlInline_AzurePipelines;Cobertura + reportgenerator -reports:$(Build.SourcesDirectory)/**/**/**/coverage.cobertura.xml -targetdir:$(Build.SourcesDirectory)/CodeCoverage -reporttypes:HtmlInline_AzurePipelines;Cobertura displayName: Create Code coverage report condition: eq(variables['Agent.OS'], 'Windows_NT') From 5d0dd65ad3f943a5fbc41a0ba2d63ee9c1d52ae7 Mon Sep 17 00:00:00 2001 From: Leszek 'skolima' Ciesielski Date: Tue, 29 Sep 2020 15:30:41 +0200 Subject: [PATCH 3/3] This collector generates results in different path --- .azure-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-build.yml b/.azure-build.yml index 1ad7f619f..2d5516dd7 100644 --- a/.azure-build.yml +++ b/.azure-build.yml @@ -41,7 +41,7 @@ steps: - script: | dotnet tool install -g dotnet-reportgenerator-globaltool - reportgenerator -reports:$(Build.SourcesDirectory)/**/**/**/coverage.cobertura.xml -targetdir:$(Build.SourcesDirectory)/CodeCoverage -reporttypes:HtmlInline_AzurePipelines;Cobertura + reportgenerator -reports:$(Agent.TempDirectory)/**/coverage.cobertura.xml -targetdir:$(Build.SourcesDirectory)/CodeCoverage -reporttypes:HtmlInline_AzurePipelines;Cobertura displayName: Create Code coverage report condition: eq(variables['Agent.OS'], 'Windows_NT')