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: 3 additions & 11 deletions .azure-pipelines/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,20 +105,12 @@ extends:
--configuration $(BuildConfiguration) `
--no-build `
-- `
--report-xunit-trx `
--results-directory "$(Agent.TempDirectory)\TestResults" `
--report-azdo `
--publish-azdo-test-results `
--results-directory="$(Agent.TempDirectory)\TestResults" `
--minimum-expected-tests 1
displayName: 'test'

- task: PublishTestResults@2
displayName: 'Publish test results'
condition: succeededOrFailed()
inputs:
testResultsFormat: VSTest
testResultsFiles: '$(Agent.TempDirectory)\TestResults\*.trx'
failTaskOnMissingResultsFile: true
failTaskOnFailedTests: true

- task: EsrpCodeSigning@6
displayName: 'ESRP CodeSigning binaries'
inputs:
Expand Down
5 changes: 4 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@ updates:
MicrosoftExtensions:
patterns:
- Microsoft.Extensions.*
coverlet:
testing:
patterns:
- coverlet.*
- Microsoft.NET.Test.Sdk
- Microsoft.Testing.*
- xunit.*
cooldown:
default-days: 7
- package-ecosystem: dotnet-sdk
Expand Down
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 --solution Microsoft.OpenApi.slnx -c Release -v n --coverlet --coverlet-output-format cobertura
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
2 changes: 1 addition & 1 deletion .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,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="**/coverage.opencover*.xml"
dotnet workload restore
dotnet build
dotnet test --solution Microsoft.OpenApi.slnx --verbosity normal --coverlet --coverlet-output-format opencover
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 }}"
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
<ItemGroup>
<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="4.0.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
<ItemGroup>
<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>

Expand Down
2 changes: 2 additions & 0 deletions test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<ItemGroup>
<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="32.0.0" />
<PackageReference Include="xunit.v3" Version="4.0.0" />
Expand Down
Loading