Skip to content

Azure pipelines #1871

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 13, 2019
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ vscps-preview.zip
npm-debug.log
.vscode-test/
*.DS_Store
test-results.xml
28 changes: 28 additions & 0 deletions .vsts-ci/azure-pipelines-ci.yml
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions .vsts-ci/templates/ci-general.yml
Original file line number Diff line number Diff line change
@@ -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: JUnit
testResultsFiles: '**/test-results.xml'
condition: succeededOrFailed()
- task: PublishBuildArtifacts@1
inputs:
ArtifactName: vscode-powershell
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
200 changes: 173 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
11 changes: 9 additions & 2 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Loading