Enable travis (#84)

* Enable travis

Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>

* make tslint happy

* fix travis.yml
This commit is contained in:
Jinbo Wang 2017-10-10 12:42:23 +08:00 committed by GitHub
parent da3e68c909
commit 99bb89736e
4 changed files with 32 additions and 4 deletions

4
.gitignore vendored
View File

@ -1,4 +1,6 @@
out out
bin bin
server server
node_modules node_modules
.vscode-test
vscode-java-debug-*.vsix

26
.travis.yml Normal file
View File

@ -0,0 +1,26 @@
language: node_js
node_js:
- '6'
os:
- linux
- osx
before_install:
- if [ $TRAVIS_OS_NAME == "linux" ]; then
export CXX="g++-4.9" CC="gcc-4.9" DISPLAY=:99.0;
sh -e /etc/init.d/xvfb start;
sleep 3;
fi
install:
- npm install -g vsce
- npm install -g typescript
- npm install -g gulp
- npm install
script:
- gulp tslint
- vsce package
- npm test --silent

View File

@ -80,7 +80,7 @@ export function activate(context: vscode.ExtensionContext) {
properties.stackTrace = (Array.isArray(exception.stackTrace) && JSON.stringify(exception.stackTrace)) properties.stackTrace = (Array.isArray(exception.stackTrace) && JSON.stringify(exception.stackTrace))
|| String(exception.stackTrace); || String(exception.stackTrace);
} else { } else {
properties.message= String(exception); properties.message = String(exception);
} }
reporter.sendTelemetryEvent("exception", properties); reporter.sendTelemetryEvent("exception", properties);
} }

View File

@ -18,12 +18,12 @@ import * as myExtension from "../src/extension";
suite("Extension Tests", () => { suite("Extension Tests", () => {
test("Extension should be present", () => { test("Extension should be present", () => {
assert.ok(vscode.extensions.getExtension("Microsoft.vscode-java-debug")); assert.ok(vscode.extensions.getExtension("vscjava.vscode-java-debug"));
}); });
test("should activate", function() { test("should activate", function() {
this.timeout(1 * 60 * 1000); this.timeout(1 * 60 * 1000);
return vscode.extensions.getExtension("Microsoft.vscode-java-debug").activate().then((api) => { return vscode.extensions.getExtension("vscjava.vscode-java-debug").activate().then((api) => {
assert.ok(true); assert.ok(true);
}); });
}); });