Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
doudou committed Mar 8, 2018
2 parents 7b9be82 + 14b3662 commit 8e7bd5e
Show file tree
Hide file tree
Showing 7 changed files with 2,668 additions and 87 deletions.
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
language: node_js
node_js:
- "8"

before_install:
# Do not modify. Required for GUI based tests: See https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI
- 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 --silent gulp-cli

script:
- npm install
- npm run compile
- gulp cover:enable
- npm run test
- gulp cover:publish
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[![Build Status](https://travis-ci.org/rock-core/vscode-rock.svg?branch=master)](https://travis-ci.org/rock-core/vscode-rock)
[![Coverage Status](https://coveralls.io/repos/github/rock-core/vscode-rock/badge.svg?branch=master)](https://coveralls.io/github/rock-core/vscode-rock?branch=master)

# Rock README

This extension provides basic services related to using Visual Studio Code to
Expand Down
6 changes: 4 additions & 2 deletions coverconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"enabled": false,
"relativeSourcePath": "../src/",
"relativeCoverageDir": "../../coverage",
"ignorePatterns": ["**/test/**"],
"ignorePatterns": [
"**/test/**"
],
"verbose": false
}
}
41 changes: 41 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
var gulp = require('gulp');
var path = require('path');
var runSequence = require('run-sequence');
var del = require('del');
var jeditor = require("gulp-json-editor");
var coveralls = require('gulp-coveralls');

gulp.task('clean', function(callback) {
runSequence('cover:clean', 'out:clean', callback);
});

gulp.task('cover:clean', function (done) {
return del('coverage', done);
});

gulp.task('cover:enable',() => {
return gulp.src("./coverconfig.json")
.pipe(jeditor(function(json) {
json.enabled = true;
return json; // must return JSON object.
}))
.pipe(gulp.dest("./", {'overwrite':true}));
});

gulp.task('cover:disable', () => {
return gulp.src("./coverconfig.json")
.pipe(jeditor(function(json) {
json.enabled = false;
return json; // must return JSON object.
}))
.pipe(gulp.dest("./", {'overwrite':true}));
});

gulp.task('cover:publish', function(callback) {
return gulp.src('coverage/lcov.info')
.pipe(coveralls());
});

gulp.task('out:clean', function(callback) {
return del('out', callback);
});
Loading

0 comments on commit 8e7bd5e

Please sign in to comment.