Skip to content

Commit

Permalink
Add product-wide code coverage + codecov.io integration (#2101)
Browse files Browse the repository at this point in the history
Add product-wide code coverage + codecov.io integration

Several new scripts were added:

npm run cov:instrument: rebuilds your sources, then instruments them for coverage. Subsequent 

npm run test will generate coverage data into the .nyc_output directory

npm run cov:merge-html: merges all reports from .nyc_output and puts a locally viewable coverage report into coverage directory
  • Loading branch information
Piotr Puszkiewicz authored Mar 12, 2018
1 parent 9c376d0 commit 007bc0e
Show file tree
Hide file tree
Showing 12 changed files with 2,747 additions and 88 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ obj/
bin/
test/**/.vscode
.logs/
.nyc_output/
coverage/

\.DS_Store
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ install:

script:
- npm test --silent
- npm run cov:instrument
- npm test --silent
- npm run cov:report

after_failure:
- ./.travis/printLogs.sh
Expand Down
21 changes: 19 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,19 @@
]
},
{
"name": "Launch Unit Tests",
"name": "Launch Feature Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}",
"--extensionTestsPath=${workspaceRoot}/out/test/unitTests"
"--extensionTestsPath=${workspaceRoot}/out/test/featureTests"
],
"env": {
"CODE_TESTS_PATH": "${workspaceRoot}/out/test/featureTests",
"CODE_EXTENSIONS_PATH": "${workspaceRoot}",
"OSVC_SUITE": "featureTests"
},
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": [
Expand All @@ -40,6 +45,12 @@
"--extensionDevelopmentPath=${workspaceRoot}",
"--extensionTestsPath=${workspaceRoot}/out/test/integrationTests"
],
"env": {
"CODE_TESTS_PATH": "${workspaceRoot}/out/test/integrationTests",
"CODE_TESTS_WORKSPACE": "${workspaceRoot}/test/integrationTests/testAssets/singleCsproj",
"CODE_EXTENSIONS_PATH": "${workspaceRoot}",
"OSVC_SUITE": "singleCsproj"
},
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": [
Expand All @@ -56,6 +67,12 @@
"--extensionDevelopmentPath=${workspaceRoot}",
"--extensionTestsPath=${workspaceRoot}/out/test/integrationTests"
],
"env": {
"CODE_TESTS_PATH": "${workspaceRoot}/out/test/integrationTests",
"CODE_TESTS_WORKSPACE": "${workspaceRoot}/test/integrationTests/testAssets/slnWithCsproj",
"CODE_EXTENSIONS_PATH": "${workspaceRoot}",
"OSVC_SUITE": "slnWithCsproj"
},
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": [
Expand Down
Loading

0 comments on commit 007bc0e

Please sign in to comment.