From db9a0c5e4ebc4b1de44852b6313b2b8ccdf0dc50 Mon Sep 17 00:00:00 2001 From: Noj Vek Date: Tue, 26 Jul 2016 08:28:07 -0700 Subject: [PATCH] Travis builds post coverage info to coveralls.io and add README badge. --- .gitignore | 3 ++- .travis.yml | 5 ++++- README.md | 4 +++- package.json | 1 + test/all.js | 4 ++-- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 584490c228540..f873989dcd62e 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ out-editor-min/ out-monaco-editor-core/ out-vscode/ out-vscode-min/ -build/node_modules \ No newline at end of file +build/node_modules +coverage/ \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 8d6643eba9aa3..a670d510f7393 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,5 +42,8 @@ script: - gulp electron - gulp compile - gulp optimize-vscode - - ./scripts/test.sh + - ./scripts/test.sh --coverage - ./scripts/test-integration.sh + +after_success: + - cat coverage/lcov.info | node_modules/.bin/coveralls \ No newline at end of file diff --git a/README.md b/README.md index 543db6d644493..4f5fabd3be3ab 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Visual Studio Code - Open Source -[![Build Status](https://travis-ci.org/Microsoft/vscode.svg?branch=master)](https://travis-ci.org/Microsoft/vscode) [![Build status](https://ci.appveyor.com/api/projects/status/vuhlhg80tj3e2a0l?svg=true)](https://ci.appveyor.com/project/VSCode/vscode) +[![Build Status](https://travis-ci.org/Microsoft/vscode.svg?branch=master)](https://travis-ci.org/Microsoft/vscode) +[![Build status](https://ci.appveyor.com/api/projects/status/vuhlhg80tj3e2a0l?svg=true)](https://ci.appveyor.com/project/VSCode/vscode) +[![Coverage Status](https://img.shields.io/coveralls/Microsoft/vscode/master.svg)](https://coveralls.io/github/Microsoft/vscode?branch=master) [VS Code](https://code.visualstudio.com) is a new type of tool that combines the simplicity of a code editor with what developers need for their core edit-build-debug cycle. Code diff --git a/package.json b/package.json index ce0993658486f..001855f07e06d 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "azure-storage": "^0.3.1", "clean-css": "3.4.6", "clone": "^1.0.2", + "coveralls": "^2.11.11", "debounce": "^1.0.0", "documentdb": "^1.5.1", "event-stream": "^3.1.7", diff --git a/test/all.js b/test/all.js index af8e0877ffdb0..f11dec96b1d3f 100644 --- a/test/all.js +++ b/test/all.js @@ -107,8 +107,8 @@ function main() { var collector = new istanbul.Collector(); collector.add(global.__coverage__); - var reporter = new istanbul.Reporter(null, path.join(path.dirname(path.dirname(__dirname)), 'Code-Coverage')); - reporter.add('html'); + var reporter = new istanbul.Reporter(); + reporter.addAll(['lcov', 'html']); reporter.write(collector, true, function () {}); }); }