Skip to content

Commit

Permalink
Fix test results publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
sharwell committed Nov 17, 2019
1 parent 33b6df9 commit 6eb15a3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 6 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ jobs:
filePath: build/opencover-report.ps1
arguments: '$(_debugArg) -NoBuild -NoReport -Azure'

- task: PublishTestResults@2
displayName: Publish test results
inputs:
testResultsFormat: xUnit
testResultsFiles: 'build/*.xml'

- task: PublishBuildArtifacts@1
displayName: Publish build logs
inputs:
Expand Down
7 changes: 3 additions & 4 deletions build/opencover-report.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ If ($AppVeyor) {
$AppVeyorArg = '-appveyor'
$register_mode = 'Path32'
} ElseIf ($Azure) {
$AppVeyorArg = '-vsts'
$register_mode = 'Path32'
}

Expand All @@ -67,7 +66,7 @@ If ($AppVeyor) {
-excludebyfile:*\*Designer.cs `
-output:"$report_folder\OpenCover.StyleCopAnalyzers.xml" `
-target:"$xunit_runner_console_net452" `
-targetargs:"$target_dll -noshadow $AppVeyorArg"
-targetargs:"$target_dll -noshadow $AppVeyorArg -xml StyleCopAnalyzers.xunit.xml"

If (($AppVeyor -or $Azure) -and -not $?) {
$host.UI.WriteErrorLine('Build failed; coverage analysis aborted.')
Expand All @@ -85,7 +84,7 @@ If (($AppVeyor -or $Azure) -and -not $?) {
-output:"$report_folder\OpenCover.StyleCopAnalyzers.xml" `
-mergebyhash -mergeoutput `
-target:"$xunit_runner_console_net46" `
-targetargs:"$target_dll_csharp7 -noshadow $AppVeyorArg"
-targetargs:"$target_dll_csharp7 -noshadow $AppVeyorArg -xml StyleCopAnalyzers.CSharp7.xunit.xml"

If (($AppVeyor -or $Azure) -and -not $?) {
$host.UI.WriteErrorLine('Build failed; coverage analysis aborted.')
Expand All @@ -103,7 +102,7 @@ If (($AppVeyor -or $Azure) -and -not $?) {
-output:"$report_folder\OpenCover.StyleCopAnalyzers.xml" `
-mergebyhash -mergeoutput `
-target:"$xunit_runner_console_net472" `
-targetargs:"$target_dll_csharp8 -noshadow $AppVeyorArg"
-targetargs:"$target_dll_csharp8 -noshadow $AppVeyorArg -xml StyleCopAnalyzers.CSharp8.xunit.xml"

If (($AppVeyor -or $Azure) -and -not $?) {
$host.UI.WriteErrorLine('Build failed; coverage analysis aborted.')
Expand Down

0 comments on commit 6eb15a3

Please sign in to comment.