Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Code coverage report #559

Merged
merged 25 commits into from
Jan 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
dd12229
Merge pull request #1 from Microsoft/master
chicm-ms Nov 13, 2018
a67a6b8
Merge pull request #2 from Microsoft/master
chicm-ms Nov 16, 2018
75fd2f1
Merge pull request #3 from Microsoft/master
chicm-ms Nov 19, 2018
10e998f
Merge pull request #4 from Microsoft/master
chicm-ms Nov 27, 2018
a0f361c
Merge pull request #5 from Microsoft/master
chicm-ms Nov 27, 2018
76d7142
Merge pull request #6 from Microsoft/master
chicm-ms Nov 28, 2018
bc10bf7
Merge pull request #7 from Microsoft/master
chicm-ms Nov 29, 2018
d76deb3
Merge pull request #8 from Microsoft/master
chicm-ms Dec 4, 2018
5a28636
Merge pull request #10 from Microsoft/master
chicm-ms Dec 17, 2018
16f9cce
Merge pull request #11 from Microsoft/master
chicm-ms Dec 19, 2018
2f3bbaf
Merge pull request #12 from Microsoft/master
chicm-ms Dec 21, 2018
3973a74
Merge pull request #13 from Microsoft/master
chicm-ms Dec 21, 2018
4d07766
Merge pull request #14 from Microsoft/master
chicm-ms Dec 24, 2018
24578ab
Add UT code coverage report
chicm-ms Dec 24, 2018
0ce853c
updates
chicm-ms Dec 24, 2018
09ed93e
updates
chicm-ms Dec 24, 2018
a5c9b9c
updates
chicm-ms Dec 24, 2018
f37aef2
updates
chicm-ms Dec 24, 2018
6fc5801
updates
chicm-ms Dec 24, 2018
e6ebc76
updates
chicm-ms Dec 25, 2018
6d6cf1b
Merge pull request #15 from Microsoft/master
chicm-ms Dec 26, 2018
8b4f5c0
Merge branch 'master' into ut_code_coverage
chicm-ms Dec 26, 2018
e0a5226
integration test python code coverage report
chicm-ms Jan 2, 2019
59585c2
Merge pull request #16 from Microsoft/master
chicm-ms Jan 2, 2019
69ecce1
Merge branch 'master' into py_code_coverage
chicm-ms Jan 2, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/nni_manager/core/test/import_all.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import * as glob from 'glob';

// Istanbul only generates report for used/imported files, the files are not used/imported by test cases
// are not included in code coverage reports.
// This is a workaround to import all files in order to show all source files in code coverage reports.

glob.sync('**/*.ts').forEach((file) => {
if (file.indexOf('node_modules/') < 0 && file.indexOf('types/') < 0
&& file.indexOf('.test.ts') < 0 && file.indexOf('main.ts')) {
try {
import('../../' + file);
} catch(err) {
}
}
})
35 changes: 30 additions & 5 deletions src/nni_manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@
"scripts": {
"postbuild": "cp -rf scripts ./dist/ && cp -rf config ./dist/",
"build": "tsc",
"test": "mocha -r ts-node/register -t 15000 --recursive **/*.test.ts --exclude node_modules/**/**/*.test.ts --exclude core/test/nnimanager.test.ts --colors",
"test": "nyc mocha -r ts-node/register -t 15000 --recursive **/*.test.ts --exclude node_modules/**/**/*.test.ts --exclude core/test/nnimanager.test.ts --colors",
"start": "node dist/main.js",
"tslint": "tslint -p ."
},
"license": "MIT",
"dependencies": {
"azure-storage": "^2.10.2",
"chai-as-promised": "^7.1.1",
"child-process-promise": "^2.2.1",
"express": "^4.16.3",
"express-joi-validator": "^2.0.0",
"js-base64": "^2.4.9",
"kubernetes-client": "^6.5.0",
"node-nvidia-smi": "^1.0.0",
"rx": "^4.1.0",
"sqlite3": "^4.0.2",
Expand All @@ -25,15 +28,13 @@
"ts-deferred": "^1.0.4",
"typescript-ioc": "^1.2.4",
"typescript-string-operations": "^1.3.1",
"webhdfs": "^1.2.0",
"azure-storage": "^2.10.2",
"kubernetes-client": "^6.5.0",
"js-base64": "^2.4.9"
"webhdfs": "^1.2.0"
},
"devDependencies": {
"@types/chai": "^4.1.4",
"@types/chai-as-promised": "^7.1.0",
"@types/express": "^4.16.0",
"@types/glob": "^7.1.1",
"@types/mocha": "^5.2.5",
"@types/node": "^10.12.18",
"@types/request": "^2.47.1",
Expand All @@ -43,7 +44,9 @@
"@types/stream-buffers": "^3.0.2",
"@types/tmp": "^0.0.33",
"chai": "^4.1.2",
"glob": "^7.1.3",
"mocha": "^5.2.0",
"nyc": "^13.1.0",
"request": "^2.87.0",
"rmdir": "^1.2.0",
"tmp": "^0.0.33",
Expand All @@ -54,5 +57,27 @@
},
"engines": {
"node": ">=10.0.0"
},
"nyc": {
"include": [
"**/*.ts"
],
"exclude": [
"**/test/*",
"./node_modules/"
],
"extension": [
".ts",
".tsx"
],
"require": [
"ts-node/register"
],
"reporter": [
"text-summary",
"html"
],
"sourceMap": true,
"instrument": true
}
}
Loading