Skip to content

more coverlet.msbuild.tasks tests #1530

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

<ItemGroup>
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="17.5.0"/>
<PackageVersion Include="Microsoft.Build.Framework" Version="17.5.0"/>
<PackageVersion Include="Microsoft.Build.Locator" Version="1.5.5" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="2.10.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyModel" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
Expand Down Expand Up @@ -53,9 +55,10 @@
-->
<PackageVersion Include="Tmds.ExecFunction" Version="0.6.0" />
<PackageVersion Include="xunit" Version="2.5.0" />
<PackageVersion Include="xunit.assemblyfixture" Version="2.2.0" />
<PackageVersion Include="xunit.assert" Version="2.5.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.0"/>

<PackageVersion Include="envdte" Version="17.7.37355" />

</ItemGroup>
</Project>
11 changes: 6 additions & 5 deletions coverlet.sln
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "coverlet.tests.projectsampl
{6ACF69B1-C01F-44A4-8F8E-2501884238D4} = {6ACF69B1-C01F-44A4-8F8E-2501884238D4}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "coverlet.msbuild.tasks.tests", "test\coverlet.msbuild.tasks.tests\coverlet.msbuild.tasks.tests.csproj", "{3ABC2066-D1C5-4CAA-8867-9C5DC777CBF8}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "coverlet.msbuild.tasks.tests", "test\coverlet.msbuild.tasks.tests\coverlet.msbuild.tasks.tests.csproj", "{351A034E-E642-4DB9-A21D-F71C8151C243}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -164,10 +164,10 @@ Global
{F508CCDD-5BC8-4AB6-97B3-D37498813C41}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F508CCDD-5BC8-4AB6-97B3-D37498813C41}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F508CCDD-5BC8-4AB6-97B3-D37498813C41}.Release|Any CPU.Build.0 = Release|Any CPU
{3ABC2066-D1C5-4CAA-8867-9C5DC777CBF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3ABC2066-D1C5-4CAA-8867-9C5DC777CBF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3ABC2066-D1C5-4CAA-8867-9C5DC777CBF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3ABC2066-D1C5-4CAA-8867-9C5DC777CBF8}.Release|Any CPU.Build.0 = Release|Any CPU
{351A034E-E642-4DB9-A21D-F71C8151C243}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{351A034E-E642-4DB9-A21D-F71C8151C243}.Debug|Any CPU.Build.0 = Debug|Any CPU
{351A034E-E642-4DB9-A21D-F71C8151C243}.Release|Any CPU.ActiveCfg = Release|Any CPU
{351A034E-E642-4DB9-A21D-F71C8151C243}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -195,6 +195,7 @@ Global
{988A5FF0-4326-4F5B-9F05-CB165543A555} = {2FEBDE1B-83E3-445B-B9F8-5644B0E0E134}
{6ACF69B1-C01F-44A4-8F8E-2501884238D4} = {2FEBDE1B-83E3-445B-B9F8-5644B0E0E134}
{F508CCDD-5BC8-4AB6-97B3-D37498813C41} = {2FEBDE1B-83E3-445B-B9F8-5644B0E0E134}
{351A034E-E642-4DB9-A21D-F71C8151C243} = {2FEBDE1B-83E3-445B-B9F8-5644B0E0E134}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9CA57C02-97B0-4C38-A027-EA61E8741F10}
Expand Down
8 changes: 4 additions & 4 deletions eng/azure-pipelines-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ pool:
steps:
- task: UseDotNet@2
inputs:
version: 6.0.413
displayName: Install .NET Core SDK 6.0.413
version: 6.0.414
displayName: Install .NET Core SDK 6.0.414

- task: UseDotNet@2
inputs:
version: 7.0.400
displayName: Install .NET Core SDK 7.0.400
version: 7.0.401
displayName: Install .NET Core SDK 7.0.401

- task: NuGetAuthenticate@0
displayName: Authenticate with NuGet feeds
Expand Down
4 changes: 4 additions & 0 deletions eng/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ trigger:
paths:
exclude: [".github", "Documentation", "*.md"]

variables:
system.debug: 'true'
EnableCoverage: 'false'

jobs:
- job: Windows
displayName: Windows
Expand Down
20 changes: 15 additions & 5 deletions eng/build.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
steps:
- task: UseDotNet@2
inputs:
version: 6.0.413
displayName: Install .NET Core SDK 6.0.413
version: 6.0.414
displayName: Install .NET Core SDK 6.0.414

- task: UseDotNet@2
inputs:
version: 7.0.400
displayName: Install .NET Core SDK 7.0.400
version: 7.0.401
displayName: Install .NET Core SDK 7.0.401

- script: dotnet restore
displayName: Restore packages
Expand All @@ -20,16 +20,26 @@ steps:

- task: DotNetCoreCLI@2
displayName: Run tests
inputs:
command: test
arguments: -c $(BuildConfiguration) --no-build
testRunTitle: $(Agent.JobName)
condition: and(succeeded(), eq(variables['enableCoverage'], 'false'))

- task: DotNetCoreCLI@2
displayName: Run tests with coverage
inputs:
command: test
arguments: -c $(BuildConfiguration) --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Include="[coverlet.collector]*%2c[coverlet.core]*%2c[coverlet.msbuild.tasks]*" /p:Exclude="[coverlet.core.tests.samples.netstandard]*%2c[coverlet.tests.xunit.extensions]*"
testRunTitle: $(Agent.JobName)
condition: and(succeeded(), eq(variables['enableCoverage'], 'true'))

- template: publish-coverlet-result-files.yml

- template: publish-coverage-results.yml
parameters:
reports: $(Build.SourcesDirectory)/**/coverage.opencover.xml
condition: and(succeeded(), eq(variables['BuildConfiguration'], 'Debug'))
condition: and(succeeded(), eq(variables['BuildConfiguration'], 'Debug'), eq(variables['enableCoverage'], 'true'))
assemblyfilters: '-xunit'


2 changes: 2 additions & 0 deletions eng/publish-coverlet-result-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ steps:

- task: CopyFiles@2
displayName: Copy trx files
condition: always()
inputs:
SourceFolder: '$(Agent.TempDirectory)'
Contents: '**/*.trx'
Expand All @@ -40,3 +41,4 @@ steps:
inputs:
path: artifacts/TestLogs
artifactName: TestLogs_$(Agent.Os)_$(BuildConfiguration)

2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "7.0.400"
"version": "7.0.401"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// The MIT License (MIT)
// Copyright (c) Toni Solarin-Sodara
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

// The MIT License (MIT)
//
// Copyright (c) 2012 Khalid Abuhakmeh
//
Expand Down
2 changes: 1 addition & 1 deletion src/coverlet.msbuild.tasks/BaseTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ namespace Coverlet.MSbuild.Tasks
{
public abstract class BaseTask : Task
{
protected static IServiceProvider ServiceProvider { get; set; }
public static IServiceProvider ServiceProvider { get; protected internal set; }
}
}
Loading