Skip to content
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

Migrate to MTP from VSTest #679

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.7.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.7.3" />
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" Version="17.13.1" />
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" Version="1.5.3" />
<PackageReference Include="MSTest" Version="3.7.3" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion DevSkim-DotNet/Microsoft.DevSkim.sln
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DevSkim.LanguageP
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DevSkim.VisualStudio.SourceGenerator", "Microsoft.DevSkim.VisualStudio.SourceGenerator\Microsoft.DevSkim.VisualStudio.SourceGenerator.csproj", "{5D12BB81-B659-4CCB-9FAC-8224A6728196}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ManualGenerator", "ManualGenerator\ManualGenerator.csproj", "{C4722145-3CF5-431D-8F47-416F3E6CFB9F}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ManualGenerator", "ManualGenerator\ManualUpdateSettingsGenerator.csproj", "{C4722145-3CF5-431D-8F47-416F3E6CFB9F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
10 changes: 10 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,14 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<!-- Testing -->
<PropertyGroup>
<!-- More info about MSTest runner https://learn.microsoft.com/dotnet/core/testing/unit-testing-mstest-runner-intro -->
<EnableMSTestRunner>true</EnableMSTestRunner>
<MSTestAnalysisMode>Recommended</MSTestAnalysisMode>
<!-- More info about dotnet test integration https://learn.microsoft.com/dotnet/core/testing/unit-testing-platform-integration-dotnet-test -->
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
<TestingPlatformShowTestsFailure>true</TestingPlatformShowTestsFailure>
</PropertyGroup>
</Project>
4 changes: 3 additions & 1 deletion Pipelines/cli/devskim-cli-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,16 @@ extends:
poolName: MSSecurity-1ES-Build-Agents-Pool
poolImage: MSSecurity-1ES-Windows-2022
poolOs: windows
dotnetTestArgs: '-- --coverage --report-trx'
- template: dotnet-test-job.yml@templates
parameters:
jobName: 'dotnet_test_ubuntu'
dotnetVersions: ['8.0.x','9.0.x']
poolName: MSSecurity-1ES-Build-Agents-Pool
poolImage: MSSecurity-1ES-Ubuntu-2204
poolOs: linux
projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj'
projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj'
dotnetTestArgs: '-- --coverage --report-trx'
- stage: Build
dependsOn:
- Test
Expand Down
2 changes: 2 additions & 0 deletions Pipelines/cli/devskim-cli-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ extends:
poolName: MSSecurity-1ES-Build-Agents-Pool
poolImage: MSSecurity-1ES-Windows-2022
poolOs: windows
dotnetTestArgs: '-- --coverage --report-trx'
- template: dotnet-test-job.yml@templates
parameters:
jobName: 'dotnet_test_ubuntu'
Expand All @@ -48,6 +49,7 @@ extends:
poolImage: MSSecurity-1ES-Ubuntu-2204
poolOs: linux
projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj'
dotnetTestArgs: '-- --coverage --report-trx'

- stage: Build
dependsOn:
Expand Down
Loading