Skip to content
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
1 change: 0 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="$(SystemThreadingTasksExtensionsVersion)" />
</ItemGroup>
<ItemGroup Label="Test dependencies">
<PackageVersion Include="Codecov" Version="1.12.3" />
<PackageVersion Include="AwesomeAssertions" Version="9.4.0" />
<PackageVersion Include="FSharp.Core" Version="11.0.100" />
<PackageVersion Include="NUnit" Version="4.6.0" />
Expand Down
25 changes: 16 additions & 9 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ stages:
# ValidateTestHostEnvironmentVariablesAsync hard-fails the run on non-NETCoreApp hosts
# (see src/Platform/Microsoft.Testing.Extensions.CrashDump/CrashDumpEnvironmentVariableProvider.cs),
# and this glob mixes net4x and net8+/net9+ hosts.
# --coverage — Codecov upload is Debug-only (see "Upload coverage to codecov.io" step
# below), so collecting coverage in Release would just write unused .coverage files.
# --coverage — coverage upload is Debug-only (see "Merge coverage" / "Publish coverage to
# Azure DevOps" steps below), so collecting coverage in Release would just write unused
# .coverage files.
- script: dotnet test --no-build --test-modules "artifacts/bin/*UnitTests*/$(_BuildConfig)/**/*UnitTests.exe" --results-directory $(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig) --no-progress --output detailed --report-trx --report-trx-filename "{asm}_{tfm}.trx" --report-azdo --report-azdo-progress --report-azdo-summary --report-junit --report-junit-filename "{asm}_{tfm}.xml" --hangdump --hangdump-timeout 15m --diagnostic --diagnostic-output-directory $(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig) --diagnostic-verbosity trace
name: TestRelease
displayName: Test (unit tests only)
Expand Down Expand Up @@ -160,13 +161,19 @@ stages:
ArtifactName: Integration_Tests_Windows_Binlogs_$(_BuildConfig)
condition: and(always(), eq(variables._BuildConfig, 'Debug'))

# Upload code coverage to codecov.io
- script: dotnet msbuild -restore
eng/CodeCoverage.proj
/p:Configuration=$(_BuildConfig)
/bl:$(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig)\CodeCoverage.binlog
displayName: Upload coverage to codecov.io
condition: and(succeeded(), eq(variables._BuildConfig, 'Debug'))
# Publish coverage to Azure DevOps. PublishCodeCoverageResults@2 accepts the binary
# .coverage format Microsoft Code Coverage emits natively (per
# https://learn.microsoft.com/azure/devops/pipelines/tasks/reference/publish-code-coverage-results-v2:
# "The task supports all kinds of coverage formats such as: .coverage, .covx, .covb,
# .cjson, .xml, .lcov, pycov, etc."), and merges multiple files via the minimatch glob.
# Coverage shows up in the build's "Code Coverage" tab and on the build summary, one
# click from the GitHub PR status check (we used to upload to codecov.io here).
- task: PublishCodeCoverageResults@2
displayName: 'Publish coverage to Azure DevOps'
inputs:
summaryFileLocation: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/*.coverage'
pathToSources: '$(Build.SourcesDirectory)/src'
condition: and(succeededOrFailed(), eq(variables._BuildConfig, 'Debug'))
Comment thread
Evangelink marked this conversation as resolved.

- task: PublishBuildArtifacts@1
displayName: 'Publish local dumps'
Expand Down
22 changes: 0 additions & 22 deletions codecov.yml

This file was deleted.

91 changes: 0 additions & 91 deletions eng/CodeCoverage.proj

This file was deleted.

5 changes: 3 additions & 2 deletions eng/pipelines/steps/test-non-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ steps:
# ValidateTestHostEnvironmentVariablesAsync hard-fails the run on non-NETCoreApp hosts
# (see src/Platform/Microsoft.Testing.Extensions.CrashDump/CrashDumpEnvironmentVariableProvider.cs).
# Skipped here too for cross-platform parity with the Windows script (mixed net4x+netcoreapp glob).
# --coverage — Codecov upload is Debug-only (see "Upload coverage to codecov.io" step
# in azure-pipelines.yml), so collecting coverage in Release would just write unused .coverage files.
# --coverage — coverage upload is Debug-only (see "Merge coverage" / "Publish coverage to
# Azure DevOps" steps in azure-pipelines.yml), so collecting coverage in Release would just
# write unused .coverage files.
- script: dotnet test --no-build --test-modules "artifacts/bin/*UnitTests*/$(_BuildConfig)/**/*UnitTests.dll" --results-directory $(BUILD.SOURCESDIRECTORY)/artifacts/TestResults/$(_BuildConfig) --no-progress --output detailed --report-trx --report-trx-filename "{asm}_{tfm}.trx" --report-azdo --report-azdo-progress --report-azdo-summary --report-junit --report-junit-filename "{asm}_{tfm}.xml" --hangdump --hangdump-timeout 15m --diagnostic --diagnostic-output-directory $(BUILD.SOURCESDIRECTORY)/artifacts/log/$(_BuildConfig) --diagnostic-verbosity trace
name: TestRelease
displayName: Test (unit tests only)
Expand Down
Loading