Travis CI, Coveralls, AppVeyor (#463)

This commit is contained in:
Anthony Dresser 2016-12-05 18:13:15 -08:00 коммит произвёл GitHub
Родитель 7b128fdefe
Коммит 0ceafb8bd0
16 изменённых файлов: 111 добавлений и 4171 удалений

1
.gitignore поставляемый
Просмотреть файл

@ -15,3 +15,4 @@ examples
sqltoolsservice
coverage
test-reports
.vscode-test

39
.travis.yml Normal file
Просмотреть файл

@ -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

Просмотреть файл

@ -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:

27
appveyor.yml Normal file
Просмотреть файл

@ -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

Просмотреть файл

@ -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')

Просмотреть файл

@ -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: [
@ -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: [
@ -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);
}

4173
npm-shrinkwrap.json сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -48,6 +48,7 @@
],
"devDependencies": {
"chai": "^3.5.0",
"coveralls": "^2.11.15",
"decache": "^4.1.0",
"del": "^2.2.1",
"gulp": "github:gulpjs/gulp#4.0",
@ -83,7 +84,7 @@
"yargs": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz"
},
"dependencies": {
"applicationinsights": "^0.15.0",
"applicationinsights": "^0.15.9",
"body-parser": "^1.15.2",
"comment-json": "^1.1.3",
"copy-paste": "^1.3.0",

3
scripts/upload.ps1 Normal file
Просмотреть файл

@ -0,0 +1,3 @@
$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path 'test-reports\*')[0])
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path 'test-reports\*')[1])

Просмотреть файл

@ -4,7 +4,7 @@ var gutil = require('gulp-util');
var cproc = require('child_process');
var os = require('os');
var del = require('del');
const path = require('path');
var path = require('path');
function installSqlToolsService(platform) {
var install = require('../out/src/languageservice/serviceInstallerUtil');

Просмотреть файл

@ -1,5 +1,4 @@
'use strict';
import * as TypeMoq from 'typemoq';
import { IConnectionCredentials, IConnectionProfile, AuthenticationTypes } from '../src/models/interfaces';
import { ConnectionCredentials } from '../src/models/connectionCredentials';

Просмотреть файл

@ -1,5 +1,4 @@
'use strict';
import * as TypeMoq from 'typemoq';
import vscode = require('vscode');

Просмотреть файл

@ -22,7 +22,8 @@ testRunner.configure(
ui: 'tdd', // the TDD UI is being used in extension.test.ts (suite, test, etc.)
reporter: 'pm-mocha-jenkins-reporter',
    reporterOptions: {
     junit_report_name: 'Tests',
     junit_report_name: 'Extension Tests',
junit_report_path: '../test-reports/extension_tests.xml',
        junit_report_stack: 1
    },
useColors: true // colored output from test results

Просмотреть файл

@ -1,9 +1,9 @@
import assert = require('assert');
import * as TypeMoq from 'typemoq';
import { ExtensionContext } from 'vscode';
import SqlToolsServiceClient from './../src/languageservice/serviceclient';
import { IPrompter } from '../src/prompts/question';
import SqlToolsServiceClient from './../src/languageservice/serviceclient';
import ConnectionManager from '../src/controllers/connectionManager';
import { IConnectionCredentials, AuthenticationTypes } from '../src/models/interfaces';

Просмотреть файл

@ -1,7 +1,7 @@
import * as TypeMoq from 'typemoq';
import assert = require('assert');
import ServerProvider from '../src/languageservice/server';
import SqlToolsServiceClient from '../src/languageservice/serviceClient';
import SqlToolsServiceClient from '../src/languageservice/serviceclient';
import {Logger} from '../src/models/logger';
import {PlatformInformation} from '../src/models/platform';

Просмотреть файл

@ -1,7 +1,5 @@
'use strict';
import { IQuestion, IPrompter, IPromptCallback } from '../src/prompts/question';
import vscode = require('vscode');
// Dummy implementation to simplify mocking