Merge pull request #98 from Azure/daschult/publishcoverage
Enable coverage in ci
This commit is contained in:
Коммит
0a8276b97a
|
@ -92,6 +92,7 @@ dist/
|
||||||
*.d.ts.map
|
*.d.ts.map
|
||||||
*.js
|
*.js
|
||||||
*.js.map
|
*.js.map
|
||||||
|
test-results.xml
|
||||||
|
|
||||||
# Rollup
|
# Rollup
|
||||||
!rollup.config.js
|
!rollup.config.js
|
||||||
|
|
|
@ -29,13 +29,13 @@ jobs:
|
||||||
customCommand: test
|
customCommand: test
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
inputs:
|
inputs:
|
||||||
testResultsFiles: '**/test-results.xml'
|
testResultsFiles: '$(System.DefaultWorkingDirectory)/test-results.xml'
|
||||||
testRunTitle: 'Test results for JavaScript'
|
testRunTitle: 'Test results for JavaScript'
|
||||||
- task: PublishCodeCoverageResults@1
|
- task: PublishCodeCoverageResults@1
|
||||||
inputs:
|
inputs:
|
||||||
codeCoverageTool: Cobertura
|
codeCoverageTool: Cobertura
|
||||||
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/*coverage.xml'
|
summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml'
|
||||||
reportDirectory: '$(System.DefaultWorkingDirectory)/**/coverage'
|
reportDirectory: '$(System.DefaultWorkingDirectory)/coverage/'
|
||||||
- job: Build
|
- job: Build
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'Ubuntu 16.04'
|
vmImage: 'Ubuntu 16.04'
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"reporterEnabled": "list, mocha-junit-reporter"
|
||||||
|
}
|
14
package.json
14
package.json
|
@ -51,8 +51,11 @@
|
||||||
"@types/node": "^10.9.4",
|
"@types/node": "^10.9.4",
|
||||||
"chai": "^4.1.2",
|
"chai": "^4.1.2",
|
||||||
"mocha": "^5.2.0",
|
"mocha": "^5.2.0",
|
||||||
|
"mocha-junit-reporter": "^1.18.0",
|
||||||
|
"mocha-multi-reporters": "^1.1.7",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"nyc": "^13.1.0",
|
"nyc": "^13.1.0",
|
||||||
|
"opn-cli": "^4.0.0",
|
||||||
"rollup": "^0.67.3",
|
"rollup": "^0.67.3",
|
||||||
"rollup-plugin-node-resolve": "^3.4.0",
|
"rollup-plugin-node-resolve": "^3.4.0",
|
||||||
"rollup-plugin-sourcemaps": "^0.4.2",
|
"rollup-plugin-sourcemaps": "^0.4.2",
|
||||||
|
@ -78,14 +81,14 @@
|
||||||
".ts"
|
".ts"
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"**/*.d.ts"
|
"coverage/**/*",
|
||||||
],
|
"**/*.d.ts",
|
||||||
"include": [
|
"**/*.js"
|
||||||
"lib/**/*.ts"
|
|
||||||
],
|
],
|
||||||
"reporter": [
|
"reporter": [
|
||||||
"text",
|
"text",
|
||||||
"html"
|
"html",
|
||||||
|
"cobertura"
|
||||||
],
|
],
|
||||||
"all": true
|
"all": true
|
||||||
},
|
},
|
||||||
|
@ -98,6 +101,7 @@
|
||||||
"test": "run-p test:tslint test:unit",
|
"test": "run-p test:tslint test:unit",
|
||||||
"test:unit": "nyc mocha",
|
"test:unit": "nyc mocha",
|
||||||
"test:tslint": "tslint -p . -c tslint.json --exclude test/**/*.ts",
|
"test:tslint": "tslint -p . -c tslint.json --exclude test/**/*.ts",
|
||||||
|
"test:coverage": "npm run test && opn coverage/index.html",
|
||||||
"prepack": "npm install && npm run build",
|
"prepack": "npm install && npm run build",
|
||||||
"publish-preview": "npm test && shx rm -rf dist/test && node ./.scripts/publish",
|
"publish-preview": "npm test && shx rm -rf dist/test && node ./.scripts/publish",
|
||||||
"local": "npm explore @ts-common/azure-js-dev-tools -- npm run local",
|
"local": "npm explore @ts-common/azure-js-dev-tools -- npm run local",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
--require ts-node/register
|
--require ts-node/register
|
||||||
--timeout 50000
|
--timeout 50000
|
||||||
--reporter list
|
--reporter mocha-multi-reporters
|
||||||
|
--reporter-options configFile=mocha.config.json
|
||||||
--colors
|
--colors
|
||||||
test/**/*.ts
|
test/**/*.ts
|
Загрузка…
Ссылка в новой задаче