From 64a7d2dc31c0c57a38415ce5d2f0695bd88ddfa5 Mon Sep 17 00:00:00 2001 From: "Tyler Leonhardt (POWERSHELL)" Date: Fri, 12 Apr 2019 10:27:36 -0700 Subject: [PATCH 1/5] add AzDO ymls --- .vsts-ci/azure-pipelines-ci.yml | 28 ++++++++++++++++++++++++++++ .vsts-ci/templates/ci-general.yml | 17 +++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .vsts-ci/azure-pipelines-ci.yml create mode 100644 .vsts-ci/templates/ci-general.yml diff --git a/.vsts-ci/azure-pipelines-ci.yml b/.vsts-ci/azure-pipelines-ci.yml new file mode 100644 index 0000000000..b82e66b037 --- /dev/null +++ b/.vsts-ci/azure-pipelines-ci.yml @@ -0,0 +1,28 @@ +trigger: +- master +- legacy/1.x +variables: + # Don't download unneeded packages + - name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE + value: 'true' + # Don't send telemetry + - name: DOTNET_CLI_TELEMETRY_OPTOUT + value: 'true' +jobs: +- job: Windows + pool: + vmImage: 'VS2017-Win2016' + steps: + - template: templates/ci-general.yml + +- job: macOS + pool: + vmImage: 'macOS-10.13' + steps: + - template: templates/ci-general.yml + +- job: Linux + pool: + vmImage: 'Ubuntu-16.04' + steps: + - template: templates/ci-general.yml diff --git a/.vsts-ci/templates/ci-general.yml b/.vsts-ci/templates/ci-general.yml new file mode 100644 index 0000000000..01340677da --- /dev/null +++ b/.vsts-ci/templates/ci-general.yml @@ -0,0 +1,17 @@ +steps: + # Setup + - pwsh: | + git clone https://github.com/PowerShell/PowerShellEditorServices.git ../PowerShellEditorServices + Install-Module InvokeBuild -Scope CurrentUser -Force + Install-Module PlatyPS -Scope CurrentUser -Force + # Build + - pwsh: Invoke-Build + - task: PublishTestResults@2 + inputs: + testRunner: VSTest + testResultsFiles: '**/*.trx' + condition: succeededOrFailed() + - task: PublishBuildArtifacts@1 + inputs: + ArtifactName: PowerShellEditorServices + PathtoPublish: '$(Build.ArtifactStagingDirectory)' From 3798e2cb6bced26481144bea1e246b94be519cde Mon Sep 17 00:00:00 2001 From: "Tyler Leonhardt (POWERSHELL)" Date: Fri, 12 Apr 2019 11:11:37 -0700 Subject: [PATCH 2/5] publish tests --- .gitignore | 1 + .vsts-ci/templates/ci-general.yml | 4 +- package-lock.json | 200 ++++++++++++++++++++++++++---- package.json | 10 +- test/index.ts | 11 +- 5 files changed, 191 insertions(+), 35 deletions(-) diff --git a/.gitignore b/.gitignore index fb8a287881..fab6d5d7bd 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ vscps-preview.zip npm-debug.log .vscode-test/ *.DS_Store +test-results.xml diff --git a/.vsts-ci/templates/ci-general.yml b/.vsts-ci/templates/ci-general.yml index 01340677da..8c2ef1a939 100644 --- a/.vsts-ci/templates/ci-general.yml +++ b/.vsts-ci/templates/ci-general.yml @@ -8,8 +8,8 @@ steps: - pwsh: Invoke-Build - task: PublishTestResults@2 inputs: - testRunner: VSTest - testResultsFiles: '**/*.trx' + testRunner: JUnit + testResultsFiles: '**/test-results.xml' condition: succeededOrFailed() - task: PublishBuildArtifacts@1 inputs: diff --git a/package-lock.json b/package-lock.json index e68291fc6a..af79e75bcc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -49,9 +49,9 @@ "dev": true }, "@types/mocha": { - "version": "2.2.48", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-2.2.48.tgz", - "integrity": "sha512-nlK/iyETgafGli8Zh9zJVCTicvU3iajSkRwOh3Hhiva598CMqNJ4NcVCGMTGKpGpTYj/9R8RLzS9NAykSSCqGw==", + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.6.tgz", + "integrity": "sha512-1axi39YdtBI7z957vdqXI4Ac25e7YihYQtJa+Clnxg1zTJEaIRbndt71O3sP4GAMgiAm0pY26/b9BrY4MR/PMw==", "dev": true }, "@types/node": { @@ -67,9 +67,9 @@ "dev": true }, "@types/sinon": { - "version": "7.0.10", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.0.10.tgz", - "integrity": "sha512-4w7SvsiUOtd4mUfund9QROPSJ5At/GQskDpqd87pJIRI6ULWSJqHI3GIZE337wQuN3aznroJGr94+o8fwvL37Q==", + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.0.11.tgz", + "integrity": "sha512-6ee09Ugx6GyEr0opUIakmxIWFNmqYPjkqa3/BuxCBokA0klsOLPgMD5K4q40lH7/yZVuJVzOfQpd7pipwjngkQ==", "dev": true }, "acorn": { @@ -252,9 +252,9 @@ } }, "browser-stdout": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", - "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, "buffer-crc32": { @@ -339,6 +339,12 @@ "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", "dev": true }, + "charenc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", + "integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=", + "dev": true + }, "cheerio": { "version": "1.0.0-rc.2", "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.2.tgz", @@ -445,6 +451,12 @@ "which": "^1.2.9" } }, + "crypt": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", + "integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=", + "dev": true + }, "css-select": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", @@ -892,9 +904,9 @@ "dev": true }, "growl": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", - "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true }, "har-schema": { @@ -923,9 +935,9 @@ } }, "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "he": { @@ -1068,6 +1080,12 @@ } } }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", @@ -1228,6 +1246,17 @@ "uc.micro": "^1.0.5" } }, + "md5": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/md5/-/md5-2.2.1.tgz", + "integrity": "sha1-U6s41f48iJG6RlMp6iP6wFQBJvk=", + "dev": true, + "requires": { + "charenc": "~0.0.1", + "crypt": "~0.0.1", + "is-buffer": "~1.1.1" + } + }, "mdurl": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", @@ -1286,21 +1315,85 @@ } }, "mocha": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-4.0.1.tgz", - "integrity": "sha512-evDmhkoA+cBNiQQQdSKZa2b9+W2mpLoj50367lhy+Klnx9OV8XlCIhigUnn1gaTFLQCa0kdNhEGDr0hCXOQFDw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", + "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", "dev": true, "requires": { - "browser-stdout": "1.3.0", - "commander": "2.11.0", + "browser-stdout": "1.3.1", + "commander": "2.15.1", "debug": "3.1.0", - "diff": "3.3.1", + "diff": "3.5.0", "escape-string-regexp": "1.0.5", "glob": "7.1.2", - "growl": "1.10.3", + "growl": "1.10.5", "he": "1.1.1", + "minimatch": "3.0.4", "mkdirp": "0.5.1", - "supports-color": "4.4.0" + "supports-color": "5.4.0" + }, + "dependencies": { + "commander": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", + "dev": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + } + } + }, + "mocha-junit-reporter": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/mocha-junit-reporter/-/mocha-junit-reporter-1.21.0.tgz", + "integrity": "sha512-mA5pwMBtKxU9xRYKlQXMmXx683zwY71dOcB/Mvn+NT8jcSObf4UMixbCuEVntHl1vZoyid+WccIcPIbayoaBcA==", + "dev": true, + "requires": { + "debug": "^2.2.0", + "md5": "^2.1.0", + "mkdirp": "~0.5.1", + "strip-ansi": "^4.0.0", + "xml": "^1.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "mocha-multi-reporters": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/mocha-multi-reporters/-/mocha-multi-reporters-1.1.7.tgz", + "integrity": "sha1-zH8/TTL0eFIJQdhSq7ZNmYhYfYI=", + "dev": true, + "requires": { + "debug": "^3.1.0", + "lodash": "^4.16.4" } }, "ms": { @@ -1859,12 +1952,12 @@ "dev": true }, "supports-color": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", - "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "^2.0.0" + "has-flag": "^3.0.0" } }, "table": { @@ -2192,6 +2285,53 @@ "source-map-support": "^0.5.0", "url-parse": "^1.4.4", "vscode-test": "^0.1.4" + }, + "dependencies": { + "browser-stdout": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", + "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=", + "dev": true + }, + "growl": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", + "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", + "dev": true + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "mocha": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-4.1.0.tgz", + "integrity": "sha512-0RVnjg1HJsXY2YFDoTNzcc1NKhYuXKRrBAG2gDygmJJA136Cs2QlRliZG1mA0ap7cuaT30mw16luAeln+4RiNA==", + "dev": true, + "requires": { + "browser-stdout": "1.3.0", + "commander": "2.11.0", + "debug": "3.1.0", + "diff": "3.3.1", + "escape-string-regexp": "1.0.5", + "glob": "7.1.2", + "growl": "1.10.3", + "he": "1.1.1", + "mkdirp": "0.5.1", + "supports-color": "4.4.0" + } + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "dev": true, + "requires": { + "has-flag": "^2.0.0" + } + } } }, "vscode-jsonrpc": { @@ -2274,6 +2414,12 @@ "mkdirp": "^0.5.1" } }, + "xml": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", + "integrity": "sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=", + "dev": true + }, "yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", diff --git a/package.json b/package.json index 7bb13cbdd8..c4a8047f5a 100644 --- a/package.json +++ b/package.json @@ -43,11 +43,13 @@ "vscode-languageclient": "~5.2.1" }, "devDependencies": { - "@types/mocha": "~2.2.32", + "@types/mocha": "~5.2.6", "@types/node": "~10.12.12", - "@types/rewire": "^2.5.28", - "@types/sinon": "^7.0.10", - "mocha": "~4.0.1", + "@types/rewire": "~2.5.28", + "@types/sinon": "~7.0.11", + "mocha": "~5.2.0", + "mocha-junit-reporter": "~1.21.0", + "mocha-multi-reporters": "~1.1.7", "rewire": "~4.0.1", "sinon": "~7.3.0", "tslint": "~5.14.0", diff --git a/test/index.ts b/test/index.ts index 4d7efea806..a42d35d3bb 100644 --- a/test/index.ts +++ b/test/index.ts @@ -2,13 +2,20 @@ * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ // tslint:disable no-var-requires - -let testRunner = require("vscode/lib/testrunner"); +import * as path from "path"; +import testRunner = require("vscode/lib/testrunner"); // See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for options testRunner.configure({ ui: "tdd", // the TDD UI is being used in extension.test.ts (suite, test, etc.) useColors: true, // colored output from test results + reporter: "mocha-multi-reporters", + reporterOptions: { + reporterEnabled: "spec, mocha-junit-reporter", + mochaJunitReporterReporterOptions: { + mochaFile: path.join(__dirname, "..", "..", "test-results.xml"), + }, + }, }); module.exports = testRunner; From 2a95dc31b57c976b1ee20f2509864fe85e7ee7ec Mon Sep 17 00:00:00 2001 From: "Tyler Leonhardt (POWERSHELL)" Date: Fri, 12 Apr 2019 11:20:36 -0700 Subject: [PATCH 3/5] artifacts --- .vsts-ci/templates/ci-general.yml | 2 +- vscode-powershell.build.ps1 | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.vsts-ci/templates/ci-general.yml b/.vsts-ci/templates/ci-general.yml index 8c2ef1a939..003f0f2900 100644 --- a/.vsts-ci/templates/ci-general.yml +++ b/.vsts-ci/templates/ci-general.yml @@ -13,5 +13,5 @@ steps: condition: succeededOrFailed() - task: PublishBuildArtifacts@1 inputs: - ArtifactName: PowerShellEditorServices + ArtifactName: vscode-powershell PathtoPublish: '$(Build.ArtifactStagingDirectory)' diff --git a/vscode-powershell.build.ps1 b/vscode-powershell.build.ps1 index 7c45685b14..7baef08ba3 100644 --- a/vscode-powershell.build.ps1 +++ b/vscode-powershell.build.ps1 @@ -9,10 +9,6 @@ param( #Requires -Modules @{ModuleName="InvokeBuild";ModuleVersion="3.0.0"} -$script:IsPullRequestBuild = - $env:APPVEYOR_PULL_REQUEST_NUMBER -and - $env:APPVEYOR_REPO_BRANCH -eq "develop" - task GetExtensionData -Before Package { $script:PackageJson = Get-Content -Raw $PSScriptRoot/package.json | ConvertFrom-Json @@ -68,7 +64,7 @@ task RestoreNodeModules { # When in a CI build use the --loglevel=error parameter so that # package install warnings don't cause PowerShell to throw up - $logLevelParam = if ($env:AppVeyor -or $env:VSTS_BUILD) { "--loglevel=error" } else { "" } + $logLevelParam = if ($env:AppVeyor -or $env:TF_BUILD) { "--loglevel=error" } else { "" } exec { & npm install $logLevelParam } } @@ -160,8 +156,12 @@ task Package { Move-Item -Force .\$($script:ExtensionName)-$($script:ExtensionVersion).vsix .\PowerShell-insiders.vsix } -task UploadArtifacts -If { $env:AppVeyor } { - Push-AppveyorArtifact .\PowerShell-insiders.vsix +task UploadArtifacts { + if ($env:AppVeyor) { + Push-AppveyorArtifact .\PowerShell-insiders.vsix + } elseif ($env:TF_BUILD) { + Copy-Item -Path PowerShell-insiders.vsix -Destination $env:BUILD_ARTIFACTSTAGINGDIRECTORY + } } # The default task is to run the entire CI build From 774405d79c943422227bb6c4c4188c7fe09db71b Mon Sep 17 00:00:00 2001 From: "Tyler Leonhardt (POWERSHELL)" Date: Fri, 12 Apr 2019 11:37:54 -0700 Subject: [PATCH 4/5] os specific artifacts --- vscode-powershell.build.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode-powershell.build.ps1 b/vscode-powershell.build.ps1 index 7baef08ba3..0a59e9c0a1 100644 --- a/vscode-powershell.build.ps1 +++ b/vscode-powershell.build.ps1 @@ -160,7 +160,7 @@ task UploadArtifacts { if ($env:AppVeyor) { Push-AppveyorArtifact .\PowerShell-insiders.vsix } elseif ($env:TF_BUILD) { - Copy-Item -Path PowerShell-insiders.vsix -Destination $env:BUILD_ARTIFACTSTAGINGDIRECTORY + Copy-Item -Path PowerShell-insiders.vsix -Destination "$env:BUILD_ARTIFACTSTAGINGDIRECTORY/$script:ExtensionName-$script:ExtensionVersion-$env:AGENT_OS.vsix" } } From 206df1c01c69aa668ec8cf148d6bca4e8f475d5e Mon Sep 17 00:00:00 2001 From: "Tyler Leonhardt (POWERSHELL)" Date: Fri, 12 Apr 2019 11:51:10 -0700 Subject: [PATCH 5/5] goodbye AppVeyor and Travis --- .travis.yml | 30 ------------------- README.md | 5 +++- appveyor.yml | 28 ----------------- build/travis.ps1 | 7 ----- .../README_FOR_MARKETPLACE.md | 23 +++++++------- vscode-powershell.build.ps1 | 16 ++++------ 6 files changed, 22 insertions(+), 87 deletions(-) delete mode 100644 .travis.yml delete mode 100644 appveyor.yml delete mode 100644 build/travis.ps1 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 80ae6b4308..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: cpp - -git: - depth: 1000 - -env: - # Avoid expensive initialization of dotnet cli, see: https://donovanbrown.com/post/Stop-wasting-time-during-NET-Core-builds - DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 - -os: - - linux - - osx -sudo: required -dist: trusty -osx_image: xcode8.3 - -before_install: - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - nvm install v6.0.0; - sudo apt-get install libunwind8; - fi -install: - - git clone https://github.com/PowerShell/PowerShellEditorServices.git ../PowerShellEditorServices - - pushd build - - bash <(curl -s https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.sh) - - popd - -script: - - ulimit -n 4096 - - pwsh -File build/travis.ps1 diff --git a/README.md b/README.md index eacfce2898..1117f206c4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ # PowerShell Language Support for Visual Studio Code [![Codacy Badge](https://api.codacy.com/project/badge/Grade/df06b9909e7442cebc1132bda0b8c0e3)](https://app.codacy.com/app/TylerLeonhardt/vscode-powershell?utm_source=github.com&utm_medium=referral&utm_content=PowerShell/vscode-powershell&utm_campaign=Badge_Grade_Dashboard) -[![Version](https://vsmarketplacebadge.apphb.com/version/ms-vscode.PowerShell.svg)](https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell) [![Installs](https://vsmarketplacebadge.apphb.com/installs-short/ms-vscode.PowerShell.svg)](https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell) [![windows build](https://img.shields.io/appveyor/ci/PowerShell/vscode-powershell/master.svg?label=windows+build)](https://ci.appveyor.com/project/PowerShell/vscode-powershell) [![linux/macos build](https://img.shields.io/travis/PowerShell/vscode-powershell/master.svg?label=linux/macos+build)](https://travis-ci.org/PowerShell/vscode-powershell) [![Join the chat at https://gitter.im/PowerShell/vscode-powershell](https://badges.gitter.im/PowerShell/vscode-powershell.svg)](https://gitter.im/PowerShell/vscode-powershell?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Build Status](https://powershell.visualstudio.com/vscode-powershell/_apis/build/status/PowerShell.vscode-powershell?branchName=master)](https://powershell.visualstudio.com/vscode-powershell/_build/latest?definitionId=51&branchName=master) +[![Version](https://vsmarketplacebadge.apphb.com/version/ms-vscode.PowerShell.svg)](https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell) +[![Installs](https://vsmarketplacebadge.apphb.com/installs-short/ms-vscode.PowerShell.svg)](https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell) +[![Join the chat at https://gitter.im/PowerShell/vscode-powershell](https://badges.gitter.im/PowerShell/vscode-powershell.svg)](https://gitter.im/PowerShell/vscode-powershell?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) This extension provides rich PowerShell language support for [Visual Studio Code](https://github.com/Microsoft/vscode). Now you can write and debug PowerShell scripts using the excellent IDE-like interface diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 5625a9ebf7..0000000000 --- a/appveyor.yml +++ /dev/null @@ -1,28 +0,0 @@ -version: '2.0.0-insiders-{build}' -image: Visual Studio 2017 -clone_depth: 10 -skip_tags: true - -branches: - only: - - master - - 2.0.0 - -environment: - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # Don't download unneeded packages - DOTNET_CLI_TELEMETRY_OPTOUT: true # Don't send telemetry - -install: - - git clone https://github.com/PowerShell/PowerShellEditorServices.git ../PowerShellEditorServices - - ps: Install-Product node '6.9.2' - - ps: | - Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force | Out-Null - Install-Module InvokeBuild -RequiredVersion 3.2.1 -Scope CurrentUser -Force | Out-Null - Install-Module platyPS -RequiredVersion 0.7.6 -Scope CurrentUser -Force | Out-Null - - powershell.exe -Command "Install-Module PowerShellGet -Force" - -build_script: - - powershell.exe -Command "Invoke-Build" - -# The build script takes care of the tests -test: off diff --git a/build/travis.ps1 b/build/travis.ps1 deleted file mode 100644 index 8aaac921f5..0000000000 --- a/build/travis.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -# Install InvokeBuild -Install-Module InvokeBuild -Scope CurrentUser -Force -Install-Module PlatyPS -Scope CurrentUser -Force - -# Build the code and perform tests -Import-module InvokeBuild -Invoke-Build diff --git a/docs/azure_data_studio/README_FOR_MARKETPLACE.md b/docs/azure_data_studio/README_FOR_MARKETPLACE.md index f7de697e41..af9be01215 100644 --- a/docs/azure_data_studio/README_FOR_MARKETPLACE.md +++ b/docs/azure_data_studio/README_FOR_MARKETPLACE.md @@ -1,7 +1,8 @@ # PowerShell Language Support for Azure Data Studio [![Codacy Badge](https://api.codacy.com/project/badge/Grade/df06b9909e7442cebc1132bda0b8c0e3)](https://app.codacy.com/app/TylerLeonhardt/vscode-powershell?utm_source=github.com&utm_medium=referral&utm_content=PowerShell/vscode-powershell&utm_campaign=Badge_Grade_Dashboard) -[![windows build](https://img.shields.io/appveyor/ci/PowerShell/vscode-powershell/master.svg?label=windows+build)](https://ci.appveyor.com/project/PowerShell/vscode-powershell) [![linux/macos build](https://img.shields.io/travis/PowerShell/vscode-powershell/master.svg?label=linux/macos+build)](https://travis-ci.org/PowerShell/vscode-powershell) [![Join the chat at https://gitter.im/PowerShell/vscode-powershell](https://badges.gitter.im/PowerShell/vscode-powershell.svg)](https://gitter.im/PowerShell/vscode-powershell?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Build Status](https://powershell.visualstudio.com/vscode-powershell/_apis/build/status/PowerShell.vscode-powershell?branchName=master)](https://powershell.visualstudio.com/vscode-powershell/_build/latest?definitionId=51&branchName=master) +[![Join the chat at https://gitter.im/PowerShell/vscode-powershell](https://badges.gitter.im/PowerShell/vscode-powershell.svg)](https://gitter.im/PowerShell/vscode-powershell?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) This extension provides rich PowerShell language support for [Azure Data Studio](github.com/Microsoft/azuredatastudio). Now you can write and debug PowerShell scripts using the excellent IDE-like interface @@ -113,17 +114,17 @@ Here is a sample of what that output will look like: ``` Name Status Size Space Recovery Compat. Owner - Available Model Level + Available Model Level ---- ------ ---- ---------- -------- ------- ----- -AdventureWorks2017 Normal 336.00 MB 57.01 MB Simple 140 sa -master Normal 6.00 MB 368.00 KB Simple 140 sa -model Normal 16.00 MB 5.53 MB Full 140 sa -msdb Normal 48.44 MB 1.70 MB Simple 140 sa -PBIRS Normal 144.00 MB 55.95 MB Full 140 sa -PBIRSTempDB Normal 16.00 MB 4.20 MB Simple 140 sa -SSISDB Normal 325.06 MB 26.21 MB Full 140 sa -tempdb Normal 72.00 MB 61.25 MB Simple 140 sa -WideWorldImporters Normal 3.2 GB 2.6 GB Simple 130 sa +AdventureWorks2017 Normal 336.00 MB 57.01 MB Simple 140 sa +master Normal 6.00 MB 368.00 KB Simple 140 sa +model Normal 16.00 MB 5.53 MB Full 140 sa +msdb Normal 48.44 MB 1.70 MB Simple 140 sa +PBIRS Normal 144.00 MB 55.95 MB Full 140 sa +PBIRSTempDB Normal 16.00 MB 4.20 MB Simple 140 sa +SSISDB Normal 325.06 MB 26.21 MB Full 140 sa +tempdb Normal 72.00 MB 61.25 MB Simple 140 sa +WideWorldImporters Normal 3.2 GB 2.6 GB Simple 130 sa ``` This example uses the `Get-SqlDatabase` cmdlet to retrieve a list of all databases on the ServerB instance, then presents a grid/table (using the `Out-GridView` cmdlet) to select which databases should be backed up. Once the user clicks on the "OK" button, only the highlighted databases will be backed up. diff --git a/vscode-powershell.build.ps1 b/vscode-powershell.build.ps1 index 0a59e9c0a1..97232fddc7 100644 --- a/vscode-powershell.build.ps1 +++ b/vscode-powershell.build.ps1 @@ -14,11 +14,7 @@ task GetExtensionData -Before Package { $script:PackageJson = Get-Content -Raw $PSScriptRoot/package.json | ConvertFrom-Json $updateVersion = $false $script:ExtensionVersion = ` - if ($env:AppVeyor) { - $updateVersion = $true - $env:APPVEYOR_BUILD_VERSION - } - elseif ($env:VSTS_BUILD) { + if ($env:VSTS_BUILD) { $updateVersion = $true $env:VSTS_BUILD_VERSION } @@ -64,7 +60,7 @@ task RestoreNodeModules { # When in a CI build use the --loglevel=error parameter so that # package install warnings don't cause PowerShell to throw up - $logLevelParam = if ($env:AppVeyor -or $env:TF_BUILD) { "--loglevel=error" } else { "" } + $logLevelParam = if ($env:TF_BUILD) { "--loglevel=error" } else { "" } exec { & npm install $logLevelParam } } @@ -157,10 +153,10 @@ task Package { } task UploadArtifacts { - if ($env:AppVeyor) { - Push-AppveyorArtifact .\PowerShell-insiders.vsix - } elseif ($env:TF_BUILD) { - Copy-Item -Path PowerShell-insiders.vsix -Destination "$env:BUILD_ARTIFACTSTAGINGDIRECTORY/$script:ExtensionName-$script:ExtensionVersion-$env:AGENT_OS.vsix" + if ($env:TF_BUILD) { + # SYSTEM_PHASENAME is the Job name. + Copy-Item -Path PowerShell-insiders.vsix ` + -Destination "$env:BUILD_ARTIFACTSTAGINGDIRECTORY/$script:ExtensionName-$script:ExtensionVersion-$env:SYSTEM_PHASENAME.vsix" } }