Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into ads-master-vscode-2…
Browse files Browse the repository at this point in the history
…020-05-31T19-47-47
  • Loading branch information
Anthony Dresser committed Jun 3, 2020
2 parents 8b0b0a0 + 2e4aee9 commit 15d8e09
Show file tree
Hide file tree
Showing 114 changed files with 2,797 additions and 2,410 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,14 @@ jobs:
name: Run Unit Tests (Electron)
- run: DISPLAY=:10 ./scripts/test-extensions-unit.sh
name: Run Extension Unit Tests (Electron)
# {{SQL CARBON EDIT}} Add coveralls. We merge first to get around issue where parallel builds weren't being combined correctly
- run: |
mkdir .build/coverage-combined
cat .build/coverage-single/lcov.info ./extensions/admin-tool-ext-win/coverage/lcov.info ./extensions/agent/coverage/lcov.info ./extensions/azurecore/coverage/lcov.info ./extensions/cms/coverage/lcov.info ./extensions/dacpac/coverage/lcov.info ./extensions/schema-compare/coverage/lcov.info ./extensions/notebook/coverage/lcov.info ./extensions/resource-deployment/coverage/lcov.info ./extensions/machine-learning/coverage/lcov.info ./extensions/sql-database-projects/coverage/lcov.info > .build/coverage-combined/lcov.info
name: Merge coverage reports
# {{SQL CARBON EDIT}} Add coveralls. We merge first to get around issue where parallel builds weren't being combined correctly
- run: node test/combineCoverage
name: Combine code coverage files
- name: Upload Code Coverage
uses: coverallsapp/github-action@v1.1.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: '.build/coverage-combined/lcov.info'
path-to-lcov: 'test/coverage/lcov.info'

# Fails with cryptic error (e.g. https://github.com/microsoft/vscode/pull/90292/checks?check_run_id=433681926#step:13:9)
# - run: DISPLAY=:10 yarn test-browser --browser chromium
Expand Down
4 changes: 2 additions & 2 deletions extensions/admin-tool-ext-win/coverConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"**/node_modules/**",
"**/test/**"
],
"includePid": false,
"reports": [
"cobertura",
"lcov"
"lcov",
"json"
],
"verbose": false,
"remapOptions": {
Expand Down
2 changes: 1 addition & 1 deletion extensions/admin-tool-ext-win/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"mocha-junit-reporter": "^1.17.0",
"mocha-multi-reporters": "^1.1.7",
"should": "^13.2.3",
"vscodetestcover": "github:corivera/vscodetestcover#1.0.6"
"vscodetestcover": "^1.0.9"
},
"__metadata": {
"id": "41",
Expand Down
7 changes: 4 additions & 3 deletions extensions/admin-tool-ext-win/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -935,9 +935,10 @@ vscode-nls@^3.2.1:
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.2.5.tgz#25520c1955108036dec607c85e00a522f247f1a4"
integrity sha512-ITtoh3V4AkWXMmp3TB97vsMaHRgHhsSFPsUdzlueSL+dRZbSNTZeOmdQv60kjCV306ghPxhDeoNUEm3+EZMuyw==

"vscodetestcover@github:corivera/vscodetestcover#1.0.6":
version "1.0.5"
resolved "https://codeload.github.com/corivera/vscodetestcover/tar.gz/14e0f2c46346b31bc1af2c590febeaf69a9112eb"
vscodetestcover@^1.0.9:
version "1.0.9"
resolved "https://registry.yarnpkg.com/vscodetestcover/-/vscodetestcover-1.0.9.tgz#0191f403dd59ba1153fc57979e281e992ce63731"
integrity sha512-8z2961KF9Tuz5XdHAC6RMV3CrzAoUcfIK7wLYjLIXD4dbHIT7ceZMhoxToW1olyi3pFnThlS4lRXtx8Q5iyMMQ==
dependencies:
decache "^4.4.0"
glob "^7.1.2"
Expand Down
4 changes: 2 additions & 2 deletions extensions/agent/coverConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"**/node_modules/**",
"**/test/**"
],
"includePid": false,
"reports": [
"cobertura",
"lcov"
"lcov",
"json"
],
"verbose": false,
"remapOptions": {
Expand Down
2 changes: 1 addition & 1 deletion extensions/agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"mocha-multi-reporters": "^1.1.7",
"should": "^13.2.1",
"typemoq": "^2.1.0",
"vscodetestcover": "github:corivera/vscodetestcover#1.0.6"
"vscodetestcover": "^1.0.9"
},
"__metadata": {
"id": "10",
Expand Down
7 changes: 4 additions & 3 deletions extensions/agent/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -769,9 +769,10 @@ vscode-nls@^3.2.1:
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.2.5.tgz#25520c1955108036dec607c85e00a522f247f1a4"
integrity sha512-ITtoh3V4AkWXMmp3TB97vsMaHRgHhsSFPsUdzlueSL+dRZbSNTZeOmdQv60kjCV306ghPxhDeoNUEm3+EZMuyw==

"vscodetestcover@github:corivera/vscodetestcover#1.0.6":
version "1.0.5"
resolved "https://codeload.github.com/corivera/vscodetestcover/tar.gz/14e0f2c46346b31bc1af2c590febeaf69a9112eb"
vscodetestcover@^1.0.9:
version "1.0.9"
resolved "https://registry.yarnpkg.com/vscodetestcover/-/vscodetestcover-1.0.9.tgz#0191f403dd59ba1153fc57979e281e992ce63731"
integrity sha512-8z2961KF9Tuz5XdHAC6RMV3CrzAoUcfIK7wLYjLIXD4dbHIT7ceZMhoxToW1olyi3pFnThlS4lRXtx8Q5iyMMQ==
dependencies:
decache "^4.4.0"
glob "^7.1.2"
Expand Down
4 changes: 2 additions & 2 deletions extensions/azurecore/coverConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"**/node_modules/**",
"**/test/**"
],
"includePid": false,
"reports": [
"cobertura",
"lcov"
"lcov",
"json"
],
"verbose": false,
"remapOptions": {
Expand Down
7 changes: 2 additions & 5 deletions extensions/azurecore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,7 @@
{
"command": "azure.resource.startterminal",
"title": "%azure.resource.startterminal.title%",
"icon": {
"dark": "resources/dark/console.svg",
"light": "resources/light/console.svg"
}
"icon": "$(console)"
},
{
"command": "azure.resource.openInAzurePortal",
Expand Down Expand Up @@ -288,6 +285,6 @@
"mocha-multi-reporters": "^1.1.7",
"should": "^13.2.1",
"typemoq": "^2.1.0",
"vscodetestcover": "github:corivera/vscodetestcover#1.0.6"
"vscodetestcover": "^1.0.9"
}
}
3 changes: 0 additions & 3 deletions extensions/azurecore/resources/dark/console.svg

This file was deleted.

3 changes: 0 additions & 3 deletions extensions/azurecore/resources/light/console.svg

This file was deleted.

7 changes: 4 additions & 3 deletions extensions/azurecore/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1331,9 +1331,10 @@ vscode-nls@^4.0.0:
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.2.tgz#ca8bf8bb82a0987b32801f9fddfdd2fb9fd3c167"
integrity sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw==

"vscodetestcover@github:corivera/vscodetestcover#1.0.6":
version "1.0.5"
resolved "https://codeload.github.com/corivera/vscodetestcover/tar.gz/14e0f2c46346b31bc1af2c590febeaf69a9112eb"
vscodetestcover@^1.0.9:
version "1.0.9"
resolved "https://registry.yarnpkg.com/vscodetestcover/-/vscodetestcover-1.0.9.tgz#0191f403dd59ba1153fc57979e281e992ce63731"
integrity sha512-8z2961KF9Tuz5XdHAC6RMV3CrzAoUcfIK7wLYjLIXD4dbHIT7ceZMhoxToW1olyi3pFnThlS4lRXtx8Q5iyMMQ==
dependencies:
decache "^4.4.0"
glob "^7.1.2"
Expand Down
4 changes: 2 additions & 2 deletions extensions/cms/coverConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"**/node_modules/**",
"**/test/**"
],
"includePid": false,
"reports": [
"cobertura",
"lcov"
"lcov",
"json"
],
"verbose": false,
"remapOptions": {
Expand Down
2 changes: 1 addition & 1 deletion extensions/cms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@
"mocha-multi-reporters": "^1.1.7",
"mocha": "^5.2.0",
"should": "^13.2.1",
"vscodetestcover": "github:corivera/vscodetestcover#1.0.6",
"vscodetestcover": "^1.0.9",
"typemoq": "^2.1.0"
},
"__metadata": {
Expand Down
7 changes: 4 additions & 3 deletions extensions/cms/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1088,9 +1088,10 @@ vscode-nls@^4.0.0:
resolved "https://registry.npmjs.org/vscode-nls/-/vscode-nls-4.0.0.tgz#4001c8a6caba5cedb23a9c5ce1090395c0e44002"
integrity sha512-qCfdzcH+0LgQnBpZA53bA32kzp9rpq/f66Som577ObeuDlFIrtbEJ+A/+CCxjIh4G8dpJYNCKIsxpRAHIfsbNw==

"vscodetestcover@github:corivera/vscodetestcover#1.0.6":
version "1.0.5"
resolved "https://codeload.github.com/corivera/vscodetestcover/tar.gz/14e0f2c46346b31bc1af2c590febeaf69a9112eb"
vscodetestcover@^1.0.9:
version "1.0.9"
resolved "https://registry.yarnpkg.com/vscodetestcover/-/vscodetestcover-1.0.9.tgz#0191f403dd59ba1153fc57979e281e992ce63731"
integrity sha512-8z2961KF9Tuz5XdHAC6RMV3CrzAoUcfIK7wLYjLIXD4dbHIT7ceZMhoxToW1olyi3pFnThlS4lRXtx8Q5iyMMQ==
dependencies:
decache "^4.4.0"
glob "^7.1.2"
Expand Down
4 changes: 2 additions & 2 deletions extensions/dacpac/coverConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"**/node_modules/**",
"**/test/**"
],
"includePid": false,
"reports": [
"cobertura",
"lcov"
"lcov",
"json"
],
"verbose": false,
"remapOptions": {
Expand Down
3 changes: 1 addition & 2 deletions extensions/dacpac/coverageConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"ignorePatterns": [
"**/node_modules/**"
],
"includePid": false,
"reports": [
"cobertura"
],
Expand All @@ -14,4 +13,4 @@
"basePath": ".",
"useAbsolutePaths": true
}
}
}
2 changes: 1 addition & 1 deletion extensions/dacpac/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"mocha-junit-reporter": "^1.17.0",
"mocha-multi-reporters": "^1.1.7",
"should": "^13.2.1",
"vscodetestcover": "github:corivera/vscodetestcover#1.0.6"
"vscodetestcover": "^1.0.9"
},
"__metadata": {
"id": "33",
Expand Down
7 changes: 4 additions & 3 deletions extensions/dacpac/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -816,9 +816,10 @@ vscode-nls@^4.0.0:
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.1.tgz#f9916b64e4947b20322defb1e676a495861f133c"
integrity sha512-4R+2UoUUU/LdnMnFjePxfLqNhBS8lrAFyX7pjb2ud/lqDkrUavFUTcG7wR0HBZFakae0Q6KLBFjMS6W93F403A==

"vscodetestcover@github:corivera/vscodetestcover#1.0.6":
version "1.0.5"
resolved "https://codeload.github.com/corivera/vscodetestcover/tar.gz/14e0f2c46346b31bc1af2c590febeaf69a9112eb"
vscodetestcover@^1.0.9:
version "1.0.9"
resolved "https://registry.yarnpkg.com/vscodetestcover/-/vscodetestcover-1.0.9.tgz#0191f403dd59ba1153fc57979e281e992ce63731"
integrity sha512-8z2961KF9Tuz5XdHAC6RMV3CrzAoUcfIK7wLYjLIXD4dbHIT7ceZMhoxToW1olyi3pFnThlS4lRXtx8Q5iyMMQ==
dependencies:
decache "^4.4.0"
glob "^7.1.2"
Expand Down
21 changes: 21 additions & 0 deletions extensions/integration-tests/coverConfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"enabled": true,
"relativeSourcePath": "../../../",
"relativeCoverageDir": "../../coverage",
"ignorePatterns": [
"**/coverage/**",
"**/generated/**",
"**/node_modules/**",
"**/test/**"
],
"reports": [
"cobertura",
"lcov",
"json"
],
"verbose": false,
"remapOptions": {
"basePath": "../../../",
"useAbsolutePaths": true
}
}
5 changes: 2 additions & 3 deletions extensions/integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
"Microsoft.azuredatastudio-postgresql"
],
"scripts": {
"vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:vscode-colorize-tests ./tsconfig.json",
"postinstall": "node ./node_modules/vscode/bin/install"
"vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:vscode-colorize-tests ./tsconfig.json"
},
"devDependencies": {
"@types/chai": "3.4.34",
Expand All @@ -33,6 +32,6 @@
"mocha-junit-reporter": "^1.17.0",
"mocha-multi-reporters": "^1.1.7",
"ms-rest-azure": "^2.6.0",
"vscode": "1.1.5"
"vscodetestcover": "^1.0.9"
}
}
48 changes: 48 additions & 0 deletions extensions/integration-tests/src/test/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import * as path from 'path';
import * as testRunner from 'vscodetestcover';

const suite = 'Extension Integration Tests';

const mochaOptions: any = {
ui: 'tdd',
useColors: true,
timeout: 60000
};

// set relevant mocha options from the environment
if (process.env.ADS_TEST_GREP) {
mochaOptions.grep = process.env.ADS_TEST_GREP;
console.log(`setting options.grep to: ${mochaOptions.grep}`);
}
if (process.env.ADS_TEST_INVERT_GREP) {
mochaOptions.invert = parseInt(process.env.ADS_TEST_INVERT_GREP);
console.log(`setting options.invert to: ${mochaOptions.invert}`);
}
if (process.env.ADS_TEST_TIMEOUT) {
mochaOptions.timeout = parseInt(process.env.ADS_TEST_TIMEOUT);
console.log(`setting options.timeout to: ${mochaOptions.timeout}`);
}
if (process.env.ADS_TEST_RETRIES) {
mochaOptions.retries = parseInt(process.env.ADS_TEST_RETRIES);
console.log(`setting options.retries to: ${mochaOptions.retries}`);
}

if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
mochaOptions.reporter = 'mocha-multi-reporters';
mochaOptions.reporterOptions = {
reporterEnabled: 'spec, mocha-junit-reporter',
mochaJunitReporterReporterOptions: {
testsuitesTitle: `${suite} ${process.platform}`,
mochaFile: path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY, `test-results/${process.platform}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`)
}
};
}

testRunner.configure(mochaOptions, { coverConfig: '../../coverConfig.json' });

export = testRunner;
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ suite('Notebook integration test suite', function () {
}
});

test('Sql NB run cells above and below test', async function () {
test('Sql NB run cells above and below test @UNSTABLE@', async function () {
let notebook = await openNotebook(sqlNotebookMultipleCellsContent, sqlKernelMetadata, this.test.title + this.invocationCount++);
// When running all cells above a cell, ensure that only cells preceding current cell have output
await runCells(notebook, true, undefined, notebook.document.cells[1]);
Expand All @@ -101,13 +101,13 @@ suite('Notebook integration test suite', function () {
assert(notebook.document.cells[2].contents.outputs.length === 3, `Expected length: '3', Actual: '${notebook.document.cells[2].contents.outputs.length}'`);
});

test('Clear cell output - SQL notebook', async function () {
test('Clear cell output - SQL notebook @UNSTABLE@', async function () {
let notebook = await openNotebook(sqlNotebookContent, sqlKernelMetadata, this.test.title + this.invocationCount++);
await runCell(notebook);
await verifyClearOutputs(notebook);
});

test('Clear all outputs - SQL notebook ', async function () {
test('Clear all outputs - SQL notebook @UNSTABLE@', async function () {
let notebook = await openNotebook(sqlNotebookContent, sqlKernelMetadata, this.test.title + this.invocationCount++);
await runCell(notebook);
await verifyClearAllOutputs(notebook);
Expand Down
50 changes: 0 additions & 50 deletions extensions/integration-tests/src/tests/index.ts

This file was deleted.

Loading

0 comments on commit 15d8e09

Please sign in to comment.