Publish unit test results in Azure Pipelines (#446)
This commit is contained in:
Родитель
03cb690e9f
Коммит
9ce049d5bb
|
@ -47,6 +47,7 @@ test/end-to-end/testFunctionApp/obj
|
|||
test/end-to-end/Azure.Functions.NodejsWorker.E2E/.vs
|
||||
test/end-to-end/Azure.Functions.NodejsWorker.E2E/Azure.Functions.NodejsWorker.E2E/bin
|
||||
test/end-to-end/Azure.Functions.NodejsWorker.E2E/Azure.Functions.NodejsWorker.E2E/obj
|
||||
**/*-test-results.xml
|
||||
|
||||
# Commit external interfaces
|
||||
types/*
|
||||
|
|
|
@ -50,6 +50,12 @@ jobs:
|
|||
displayName: 'npm run lint'
|
||||
- script: npm test
|
||||
displayName: 'npm test'
|
||||
- task: PublishTestResults@2
|
||||
displayName: 'Publish Unit Test Results'
|
||||
inputs:
|
||||
testResultsFiles: 'test/unit-test-results.xml'
|
||||
testRunTitle: 'Unit $(Agent.JobName)'
|
||||
condition: succeededOrFailed()
|
||||
|
||||
- job: E2ETests
|
||||
strategy:
|
||||
|
@ -84,10 +90,12 @@ jobs:
|
|||
languageWorkers:node:workerDirectory: $(System.DefaultWorkingDirectory)
|
||||
nodeVersion: $(NODE_VERSION)
|
||||
- task: PublishTestResults@2
|
||||
displayName: 'Publish E2E Test Results'
|
||||
condition: always()
|
||||
inputs:
|
||||
testRunner: VSTest
|
||||
testResultsFiles: '**/*.trx'
|
||||
testRunTitle: 'E2E $(Agent.JobName)'
|
||||
failTaskOnFailedTests: true
|
||||
|
||||
- job: BuildArtifacts
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
"husky": "^7.0.2",
|
||||
"jsdoc": "^3.6.3",
|
||||
"mocha": "^9.1.1",
|
||||
"mocha-junit-reporter": "^2.0.2",
|
||||
"mocha-multi-reporters": "^1.5.1",
|
||||
"mock-require": "^2.0.2",
|
||||
"node-abi": "2.1.1",
|
||||
"prettier": "^2.4.1",
|
||||
|
@ -1216,6 +1218,15 @@
|
|||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/charenc": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz",
|
||||
"integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/check-error": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
|
||||
|
@ -1317,6 +1328,15 @@
|
|||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/crypt": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz",
|
||||
"integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/css-loader": {
|
||||
"version": "0.9.1",
|
||||
"resolved": "https://registry.npmjs.org/css-loader/-/css-loader-0.9.1.tgz",
|
||||
|
@ -2283,6 +2303,12 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/is-buffer": {
|
||||
"version": "1.1.6",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
|
||||
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/is-core-module": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.7.0.tgz",
|
||||
|
@ -2748,6 +2774,17 @@
|
|||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/md5": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz",
|
||||
"integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"charenc": "0.0.2",
|
||||
"crypt": "0.0.2",
|
||||
"is-buffer": "~1.1.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mdurl": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
|
||||
|
@ -2884,6 +2921,53 @@
|
|||
"url": "https://opencollective.com/mochajs"
|
||||
}
|
||||
},
|
||||
"node_modules/mocha-junit-reporter": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/mocha-junit-reporter/-/mocha-junit-reporter-2.0.2.tgz",
|
||||
"integrity": "sha512-vYwWq5hh3v1lG0gdQCBxwNipBfvDiAM1PHroQRNp96+2l72e9wEUTw+mzoK+O0SudgfQ7WvTQZ9Nh3qkAYAjfg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"debug": "^2.2.0",
|
||||
"md5": "^2.1.0",
|
||||
"mkdirp": "~0.5.1",
|
||||
"strip-ansi": "^6.0.1",
|
||||
"xml": "^1.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"mocha": ">=2.2.5"
|
||||
}
|
||||
},
|
||||
"node_modules/mocha-junit-reporter/node_modules/debug": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/mocha-junit-reporter/node_modules/ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/mocha-multi-reporters": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/mocha-multi-reporters/-/mocha-multi-reporters-1.5.1.tgz",
|
||||
"integrity": "sha512-Yb4QJOaGLIcmB0VY7Wif5AjvLMUFAdV57D2TWEva1Y0kU/3LjKpeRVmlMIfuO1SVbauve459kgtIizADqxMWPg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"debug": "^4.1.1",
|
||||
"lodash": "^4.17.15"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"mocha": ">=3.1.2"
|
||||
}
|
||||
},
|
||||
"node_modules/mocha/node_modules/cliui": {
|
||||
"version": "7.0.4",
|
||||
"resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
|
||||
|
@ -4497,6 +4581,12 @@
|
|||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/xml": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz",
|
||||
"integrity": "sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/xmlcreate": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.3.tgz",
|
||||
|
@ -5492,6 +5582,12 @@
|
|||
"supports-color": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"charenc": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz",
|
||||
"integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=",
|
||||
"dev": true
|
||||
},
|
||||
"check-error": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
|
||||
|
@ -5573,6 +5669,12 @@
|
|||
"which": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"crypt": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz",
|
||||
"integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=",
|
||||
"dev": true
|
||||
},
|
||||
"css-loader": {
|
||||
"version": "0.9.1",
|
||||
"resolved": "https://registry.npmjs.org/css-loader/-/css-loader-0.9.1.tgz",
|
||||
|
@ -6282,6 +6384,12 @@
|
|||
"binary-extensions": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"is-buffer": {
|
||||
"version": "1.1.6",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
|
||||
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
|
||||
"dev": true
|
||||
},
|
||||
"is-core-module": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.7.0.tgz",
|
||||
|
@ -6648,6 +6756,17 @@
|
|||
"integrity": "sha512-/Q+7MGzaETqifOMWYEA7HVMaZb4XbcRfaOzcSsHZEith83KGlvaSG33u0SKu89Mj5h+T8V2hM+8O45Qc5XTgwA==",
|
||||
"dev": true
|
||||
},
|
||||
"md5": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz",
|
||||
"integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"charenc": "0.0.2",
|
||||
"crypt": "0.0.2",
|
||||
"is-buffer": "~1.1.6"
|
||||
}
|
||||
},
|
||||
"mdurl": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
|
||||
|
@ -6830,6 +6949,46 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"mocha-junit-reporter": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/mocha-junit-reporter/-/mocha-junit-reporter-2.0.2.tgz",
|
||||
"integrity": "sha512-vYwWq5hh3v1lG0gdQCBxwNipBfvDiAM1PHroQRNp96+2l72e9wEUTw+mzoK+O0SudgfQ7WvTQZ9Nh3qkAYAjfg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"debug": "^2.2.0",
|
||||
"md5": "^2.1.0",
|
||||
"mkdirp": "~0.5.1",
|
||||
"strip-ansi": "^6.0.1",
|
||||
"xml": "^1.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"mocha-multi-reporters": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/mocha-multi-reporters/-/mocha-multi-reporters-1.5.1.tgz",
|
||||
"integrity": "sha512-Yb4QJOaGLIcmB0VY7Wif5AjvLMUFAdV57D2TWEva1Y0kU/3LjKpeRVmlMIfuO1SVbauve459kgtIizADqxMWPg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"debug": "^4.1.1",
|
||||
"lodash": "^4.17.15"
|
||||
}
|
||||
},
|
||||
"mock-require": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/mock-require/-/mock-require-2.0.2.tgz",
|
||||
|
@ -7932,6 +8091,12 @@
|
|||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
||||
"dev": true
|
||||
},
|
||||
"xml": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz",
|
||||
"integrity": "sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=",
|
||||
"dev": true
|
||||
},
|
||||
"xmlcreate": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.3.tgz",
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
"chalk": "^4.0.0",
|
||||
"jsdoc": "^3.6.3",
|
||||
"mocha": "^9.1.1",
|
||||
"mocha-junit-reporter": "^2.0.2",
|
||||
"mocha-multi-reporters": "^1.5.1",
|
||||
"mock-require": "^2.0.2",
|
||||
"node-abi": "2.1.1",
|
||||
"prettier": "^2.4.1",
|
||||
|
@ -54,7 +56,7 @@
|
|||
"build": "rimraf dist && npm run gen && shx mkdir -p dist/azure-functions-language-worker-protobuf/src && shx cp azure-functions-language-worker-protobuf/src/rpc.* dist/azure-functions-language-worker-protobuf/src/. && tsc",
|
||||
"build-nomaps": "npm run build -- --sourceMap false",
|
||||
"gen": "node scripts/generateProtos.js",
|
||||
"test": "mocha -r ts-node/register ./test/**/*.ts",
|
||||
"test": "mocha -r ts-node/register ./test/**/*.ts --reporter mocha-multi-reporters --reporter-options configFile=test/mochaReporterOptions.json",
|
||||
"lint": "eslint src",
|
||||
"lint-fix": "eslint src --fix",
|
||||
"watch": "tsc --watch",
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"reporterEnabled": "spec, mocha-junit-reporter",
|
||||
"mochaJunitReporterReporterOptions": {
|
||||
"mochaFile": "test/unit-test-results.xml"
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче