Skip to content
Merged
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
14 changes: 9 additions & 5 deletions .azure-pipelines/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,16 @@ extends:
arguments: '--configuration $(BuildConfiguration) --no-incremental'

# Run the Unit test
- task: DotNetCoreCLI@2
- pwsh: |
dotnet test "$(Build.SourcesDirectory)\Microsoft.OpenApi.slnx" `
--configuration $(BuildConfiguration) `
--no-build `
-- `
--report-azdo `
--publish-azdo-test-results `
--results-directory="$(Agent.TempDirectory)\TestResults" `
--minimum-expected-tests 1
displayName: 'test'
inputs:
command: test
projects: '$(Build.SourcesDirectory)\Microsoft.OpenApi.slnx'
arguments: '--configuration $(BuildConfiguration) --no-build'

- task: EsrpCodeSigning@6
displayName: 'ESRP CodeSigning binaries'
Expand Down
79 changes: 46 additions & 33 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,48 @@
version: 2
updates:
- package-ecosystem: "github-actions"
# default location of `.github/workflows`
directory: "/"
open-pull-requests-limit: 10
schedule:
interval: "daily"
- package-ecosystem: "nuget"
# location of package manifests
directory: "/"
open-pull-requests-limit: 10
schedule:
interval: "daily"
groups:
MicrosoftExtensions:
patterns:
- "Microsoft.Extensions.*"
coverlet:
patterns:
- "coverlet.*"
- package-ecosystem: dotnet-sdk
directory: /
schedule:
interval: "daily"
ignore:
- dependency-name: '*'
update-types:
- version-update:semver-major
- version-update:semver-minor
- package-ecosystem: "devcontainers"
directory: "/"
open-pull-requests-limit: 10
schedule:
interval: "daily"
- package-ecosystem: github-actions
directory: /
open-pull-requests-limit: 10
schedule:
interval: daily
groups:
codeql:
patterns:
- github/codeql-action*
cooldown:
default-days: 7
- package-ecosystem: nuget
directory: /
open-pull-requests-limit: 10
schedule:
interval: daily
groups:
MicrosoftExtensions:
patterns:
- Microsoft.Extensions.*
testing:
patterns:
- coverlet.*
- Microsoft.NET.Test.Sdk
- Microsoft.Testing.*
- xunit.*
cooldown:
default-days: 7
- package-ecosystem: dotnet-sdk
directory: /
schedule:
interval: daily
ignore:
- dependency-name: '*'
update-types:
- version-update:semver-major
- version-update:semver-minor
cooldown:
default-days: 7
- package-ecosystem: devcontainers
directory: /
open-pull-requests-limit: 10
schedule:
interval: daily
cooldown:
default-days: 7
4 changes: 2 additions & 2 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
id: run_unit_tests
shell: pwsh
run: |
dotnet test Microsoft.OpenApi.slnx -c Release --no-build -v n --collect:"XPlat Code Coverage"
dotnet test --solution Microsoft.OpenApi.slnx -c Release -v n --results-directory=./TestResults --coverlet --coverlet-output-format cobertura --report-gh

- name: Install report generator
shell: pwsh
Expand All @@ -55,7 +55,7 @@ jobs:
- name: Generate coverage report
shell: pwsh
run: |
reportgenerator -reports:**/coverage.cobertura.xml -targetdir:./reports/coverage -reporttypes:"Html;MarkdownSummaryGithub;Cobertura"
reportgenerator -reports:./TestResults/**/coverage.cobertura.*.xml -targetdir:./reports/coverage -reporttypes:"Html;MarkdownSummaryGithub;Cobertura"

- name: Add coverage to job summary
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ jobs:
dotnet tool run dotnet-sonarscanner begin /k:"microsoft_OpenAPI.NET" /o:"microsoft" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="test/**/coverage.opencover.xml"
dotnet workload restore
dotnet build
dotnet test Microsoft.OpenApi.slnx --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
dotnet tool run dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
dotnet test --solution Microsoft.OpenApi.slnx --verbosity normal --coverlet --coverlet-output-format opencover --report-gh
dotnet tool run dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
5 changes: 4 additions & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"sdk": {
"version": "10.0.302"
"version": "10.0.400"
},
"test": {
"runner": "Microsoft.Testing.Platform"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@
<NoWarn>CA2007</NoWarn>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\src\Microsoft.OpenApi.snk</AssemblyOriginatorKeyFile>
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
<PackageReference Include="coverlet.MTP" Version="10.0.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.9.0" />
<PackageReference Include="Microsoft.Testing.Extensions.AzureDevOpsReport" Version="2.4.0" />
<PackageReference Include="Microsoft.Testing.Extensions.GitHubActionsReport" Version="2.4.0" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="xunit.v3" Version="3.2.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5" PrivateAssets="all" />
<PackageReference Include="coverlet.collector" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="xunit.v3" Version="4.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\src\Microsoft.OpenApi.snk</AssemblyOriginatorKeyFile>
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="**\*.yaml" Exclude="**\bin\**;**\obj\**">
Expand All @@ -15,11 +16,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="8.0.1" PrivateAssets="all" />
<PackageReference Include="coverlet.msbuild" Version="8.0.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.4.0" />
<PackageReference Include="xunit.v3" Version="3.2.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5" PrivateAssets="all" />
<PackageReference Include="coverlet.MTP" Version="10.0.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.9.0" />
<PackageReference Include="Microsoft.Testing.Extensions.AzureDevOpsReport" Version="2.4.0" />
<PackageReference Include="Microsoft.Testing.Extensions.GitHubActionsReport" Version="2.4.0" />
<PackageReference Include="xunit.v3" Version="4.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
13 changes: 7 additions & 6 deletions test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@
<SignAssembly>true</SignAssembly>
<OutputType>Library</OutputType>
<AssemblyOriginatorKeyFile>..\..\src\Microsoft.OpenApi.snk</AssemblyOriginatorKeyFile>
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="coverlet.msbuild" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
<PackageReference Include="coverlet.MTP" Version="10.0.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.9.0" />
<PackageReference Include="Microsoft.Testing.Extensions.AzureDevOpsReport" Version="2.4.0" />
<PackageReference Include="Microsoft.Testing.Extensions.GitHubActionsReport" Version="2.4.0" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="Verify.XunitV3" Version="31.28.0" />
<PackageReference Include="xunit.v3" Version="3.2.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5" PrivateAssets="all" />
<PackageReference Include="Verify.XunitV3" Version="32.0.0" />
<PackageReference Include="xunit.v3" Version="4.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading