diff --git a/build/ci/job-template.yml b/build/ci/job-template.yml index f4e0bcd57a..3dd53bf2ef 100644 --- a/build/ci/job-template.yml +++ b/build/ci/job-template.yml @@ -148,6 +148,21 @@ jobs: - script: $(dotnetPath) msbuild -restore build/Codecoverage.proj displayName: Upload coverage to codecov.io condition: and(succeeded(), eq(${{ parameters.codeCoverage }}, True)) + - task: PublishTestResults@2 + displayName: Publish Test Results + condition: succeededOrFailed() + inputs: + testRunner: 'xUnit' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults' + # Upload all test results except performance test project. On CI by default performance tests + # will not run and test result files will still be generate without details. Avoid uploading + # performance test result to avoid warnings on publish test result stage. + testResultsFiles: | + **/*.xml + !**/*PerformanceTests*.xml + testRunTitle: Machinelearning_Tests_${{ parameters.name }}_$(_configuration)_$(Build.BuildNumber) + configuration: $(_configuration) + mergeTestResults: true - task: CopyFiles@2 displayName: Stage build logs condition: not(succeeded()) diff --git a/test/Microsoft.ML.OnnxTransformerTest/Microsoft.ML.OnnxTransformerTest.csproj b/test/Microsoft.ML.OnnxTransformerTest/Microsoft.ML.OnnxTransformerTest.csproj index d7c904ab67..dd5706eafa 100644 --- a/test/Microsoft.ML.OnnxTransformerTest/Microsoft.ML.OnnxTransformerTest.csproj +++ b/test/Microsoft.ML.OnnxTransformerTest/Microsoft.ML.OnnxTransformerTest.csproj @@ -1,4 +1,8 @@  + + true + true + diff --git a/test/Microsoft.ML.TestFramework/Microsoft.ML.TestFramework.csproj b/test/Microsoft.ML.TestFramework/Microsoft.ML.TestFramework.csproj index c96155f76d..d9b057e907 100644 --- a/test/Microsoft.ML.TestFramework/Microsoft.ML.TestFramework.csproj +++ b/test/Microsoft.ML.TestFramework/Microsoft.ML.TestFramework.csproj @@ -1,4 +1,8 @@  + + true + true +