From b534f479edc522a7dd9aa29277e60c0d3afaeadc Mon Sep 17 00:00:00 2001 From: "Jianjie Liu (MAIDAP)" Date: Wed, 27 Jan 2021 14:12:40 -0500 Subject: [PATCH] Separate test report in a template --- devops/templates/publish-cov.yml | 14 +------------- devops/templates/publish-test-results.yml | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 13 deletions(-) create mode 100644 devops/templates/publish-test-results.yml diff --git a/devops/templates/publish-cov.yml b/devops/templates/publish-cov.yml index 8b78637..efabfbb 100644 --- a/devops/templates/publish-cov.yml +++ b/devops/templates/publish-cov.yml @@ -1,18 +1,6 @@ -parameters: -- name: pyVersion - type: string +# Template for publishing code coverage report steps: -- task: PublishTestResults@2 - inputs: - testResultsFormat: 'JUnit' - testResultsFiles: 'junit/*.xml' - searchFolder: $(Build.SourcesDirectory) - testRunTitle: $(Agent.OS) py$(pyVersion) Build - buildPlatform: $(Agent.OS) - condition: always() # Always publish test results - displayName: 'Publish unit test report' - - task: PublishCodeCoverageResults@1 inputs: codeCoverageTool: Cobertura diff --git a/devops/templates/publish-test-results.yml b/devops/templates/publish-test-results.yml new file mode 100644 index 0000000..9f82c55 --- /dev/null +++ b/devops/templates/publish-test-results.yml @@ -0,0 +1,16 @@ +# Template for publishing test result report + +parameters: +- name: pyVersion + type: string + +steps: +- task: PublishTestResults@2 + inputs: + testResultsFormat: 'JUnit' + testResultsFiles: 'junit/*.xml' + searchFolder: $(Build.SourcesDirectory) + testRunTitle: $(Agent.OS) py$(pyVersion) Build + buildPlatform: $(Agent.OS) + condition: always() # Always publish test results + displayName: 'Publish unit test report' \ No newline at end of file