Skip to content

Commit

Permalink
Merge fca229e into 29fd1fe
Browse files Browse the repository at this point in the history
  • Loading branch information
uve committed Oct 19, 2018
2 parents 29fd1fe + fca229e commit adf05f9
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 9 deletions.
41 changes: 41 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript

pool:
vmImage: 'Ubuntu 16.04'

steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'

- script: |
npm install
npm run lint
npm run test
displayName: 'npm install, lint and test'

# Publish Test Results to Azure Pipelines/TFS
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit' # Options: JUnit, NUnit, VSTest, xUnit
testResultsFiles: '**/TESTS-*.xml'
testRunTitle: 'LineDotChart tests'
#searchFolder: '$(System.DefaultWorkingDirectory)' # Optional
mergeTestResults: true # Optional
#buildPlatform: # Optional
#buildConfiguration: # Optional
#publishRunAttachments: true # Optional

# Publish Code Coverage Results
# Publish Cobertura or JaCoCo code coverage results from a build
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: 'cobertura' # Options: cobertura, jaCoCo
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/cobertura-coverage.xml'
#reportDirectory: '$(System.DefaultWorkingDirectory)/**/coverage'
#additionalCodeCoverageFiles: # Optional
#failIfCoverageEmpty: false # Optional
8 changes: 7 additions & 1 deletion karma.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ module.exports = (config: Config) => {
frameworks: ["jasmine"],
reporters: [
"progress",
"junit",
"coverage-istanbul"
],
coverageIstanbulReporter: {
reports: ["html", "lcovonly", "text-summary"],
reports: ["html", "lcovonly", "text-summary", "cobertura"],
combineBrowserReports: true,
fixWebpackSourcePaths: true
},
Expand All @@ -62,6 +63,7 @@ module.exports = (config: Config) => {
"karma-jasmine",
"karma-sourcemap-loader",
"karma-chrome-launcher",
"karma-junit-reporter",
"karma-coverage-istanbul-reporter"
],
files: [
Expand All @@ -82,6 +84,10 @@ module.exports = (config: Config) => {
included: false
}
],
junitReporter: {
outputDir: coverageFolder,
useBrowserName: true
},
preprocessors: {
[testRecursivePath]: ["webpack"],
[srcRecursivePath]: ["webpack", "coverage"]
Expand Down
27 changes: 20 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,15 @@
"powerbi-visuals-utils-testutils": "^2.0.4",
"powerbi-visuals-utils-tooltiputils": "^2.0.2",
"powerbi-visuals-utils-typeutils": "2.0.1",
"puppeteer": "1.5.0",
"puppeteer": "^1.5.0",
"style-loader": "0.21.0",
"ts-loader": "4.4.2",
"ts-node": "7.0.0",
"tslint": "4.0.2",
"typescript": "3.0.1",
"webpack": "4.14.0"
},
"dependencies": {
"karma-junit-reporter": "^1.2.0"
}
}

0 comments on commit adf05f9

Please sign in to comment.