Add pipeline args for testing (#7028)

* add pipeline args for testing

* fix test publish step

* simplify some testing code

* change coverage reporters

* fix coverage reports
This commit is contained in:
Anthony Dresser
2019-09-03 17:59:19 -07:00
committed by GitHub
parent c94291af52
commit b8518f5795
4 changed files with 23 additions and 36 deletions

View File

@@ -62,23 +62,25 @@ steps:
displayName: "Compile"
- script: |
DISPLAY=:10 ./scripts/test.sh --reporter mocha-junit-reporter
displayName: "Tests"
DISPLAY=:10 ./scripts/test.sh --tfs "Unit Tests"
displayName: Run Unit Tests
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
- script: |
DISPLAY=:10 ./scripts/test.sh --reporter mocha-junit-reporter --coverage
DISPLAY=:10 ./scripts/test.sh --tfs "Unit Tests" --coverage
displayName: "Tests"
condition: and(succeeded(), ne(variables['Agent.OS'], 'Linux'))
- task: PublishTestResults@2
displayName: Publish Tests Results
inputs:
testResultsFiles: "**/test-results.xml"
testResultsFiles: '*-results.xml'
searchFolder: '$(Build.ArtifactStagingDirectory)/test-results'
condition: succeededOrFailed()
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: "cobertura"
codeCoverageTool: 'cobertura'
summaryFileLocation: $(System.DefaultWorkingDirectory)/.build/coverage/cobertura-coverage.xml
reportDirectory: $(System.DefaultWorkingDirectory)/.build/coverage/lcov-reports
reportDirectory: $(System.DefaultWorkingDirectory)/.build/coverage/lcov-report
condition: ne(variables['Agent.OS'], 'Linux')