Skip to content

Commit

Permalink
Travis CI, Coveralls, AppVeyor (#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Dresser committed Dec 6, 2016
1 parent 7b128fd commit 0ceafb8
Show file tree
Hide file tree
Showing 16 changed files with 118 additions and 4,178 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -14,4 +14,5 @@ tools
examples
sqltoolsservice
coverage
test-reports
test-reports
.vscode-test
39 changes: 39 additions & 0 deletions .travis.yml
@@ -0,0 +1,39 @@
sudo: required
dist: trusty

language: node_js
node_js:
- "6.9.1"

os:
- linux
- osx

before_install:
- export CHROME_BIN=chromium-browser
# Set up chrome on osx
- if [ $TRAVIS_OS_NAME == "osx" ]; then
brew cask install google-chrome;
export CHROME_BIN=/Applications/Google\ Chrome.app;
fi
- export BUILDMACHINE=true
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install xclip; fi
- npm install -g npm
install:
- npm install -g --silent gulp-cli
- npm install -g --silent xvfb-maybe
- npm install
- gulp install
script:
- gulp build
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then gulp cover:enableconfig; fi
- if [ $TRAVIS_OS_NAME == "osx" ]; then
sudo xvfb-maybe ./node_modules/.bin/karma start;
else
xvfb-maybe ./node_modules/.bin/karma start;
fi
- xvfb-maybe node ./node_modules/vscode/bin/test
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
gulp cover:combine;
node_modules/.bin/coveralls < coverage/lcov.info;
fi
4 changes: 4 additions & 0 deletions README.md
@@ -1,5 +1,9 @@
[![Travis CI](https://travis-ci.org/Microsoft/vscode-mssql.svg?branch=dev)](https://travis-ci.org/Microsoft/vscode-mssql)
[![AppVeyor](https://ci.appveyor.com/api/projects/status/github/{INSERT_ACCOUNT_HERE}/vscode-mssql?svg=true&retina=true&branch=dev)](https://ci.appveyor.com/project/{INSERT_ACCOUNT_HERE}/vscode-mssql)
[![Coverage Status](https://coveralls.io/repos/github/Microsoft/vscode-mssql/badge.svg?branch=dev)](https://coveralls.io/github/Microsoft/vscode-mssql?branch=dev)
[![Gitter](https://img.shields.io/badge/chat-on%20gitter-blue.svg)](https://gitter.im/Microsoft/mssql)


# mssql for Visual Studio Code

Welcome to **mssql** <sup>preview</sup> for Visual Studio Code! An extension for developing Microsoft SQL Server, Azure SQL Database and SQL Data Warehouse everywhere with a rich set of functionalities, including:
Expand Down
27 changes: 27 additions & 0 deletions appveyor.yml
@@ -0,0 +1,27 @@
environment:
nodejs_version: "6.9.1"

# Install scripts. (runs after repo cloning)
install:
- choco install googlechrome
- set BUILDMACHINE=true
# Get the latest stable version of Node.js or io.js
- ps: Install-Product node $env:nodejs_version
- npm install -g npm
# show versions
- npm --version
- node --version
- npm install -g --silent gulp-cli
# install modules
- npm install
- gulp install

build_script:
- gulp build

test_script:
- ./node_modules/.bin/karma start
- node ./node_modules/vscode/bin/test

on_finish:
- ps: scripts\upload.ps1
2 changes: 1 addition & 1 deletion gulpfile.js
Expand Up @@ -15,7 +15,7 @@ var through = require('through2');
var cproc = require('child_process');
var os = require('os');
var jeditor = require("gulp-json-editor");
const path = require('path');
var path = require('path');

require('./tasks/htmltasks')
require('./tasks/packagetasks')
Expand Down
15 changes: 13 additions & 2 deletions karma.conf.js
Expand Up @@ -10,7 +10,7 @@ module.exports = function(config) {
var testBase = 'out/src/views/htmlcontent/test/'; // transpiled test JS and map files
var testSrcBase = 'src/views/htmlcontent/test/'; // test source TS files

config.set({
var configuration = {
basePath: path.join(__dirname),
frameworks: ['jasmine'],
plugins: [
Expand Down Expand Up @@ -96,6 +96,12 @@ module.exports = function(config) {
'out/src/views/htmlcontent/dist/**/!(*spec)*.js': 'coverage',
},
reporters: ['progress', 'coverage', 'karma-remap-istanbul', 'junit'],
customLaunchers: {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},
coverageReporter: {
dir : 'coverage/',
reporters: [
Expand All @@ -119,5 +125,10 @@ module.exports = function(config) {
autoWatch: true,
browsers: ['Chrome'],
singleRun: true
})
}

if (process.env.TRAVIS) {
configuration.browsers = ['Chrome_travis_ci'];
}
config.set(configuration);
}

0 comments on commit 0ceafb8

Please sign in to comment.