Skip to content
Merged
77 changes: 77 additions & 0 deletions build/ci/templates/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
steps:
- bash: |
printenv
displayName: "Show all env vars"
condition: eq(variables['system.debug'], 'true')

- task: NodeTool@0
displayName: "Use Node $(NodeVersion)"
inputs:
versionSpec: $(NodeVersion)

- task: UsePythonVersion@0
displayName: "Use Python $(PythonVersion)"
inputs:
versionSpec: $(PythonVersion)

- task: Npm@1
displayName: "Use NPM $(NpmVersion)"
inputs:
command: custom
verbose: true
customCommand: "install -g npm@$(NpmVersion)"

- task: Npm@1
displayName: "npm ci"
inputs:
command: custom
verbose: true
customCommand: ci

- bash: |
echo AVAILABLE DEPENDENCY VERSIONS
echo Node Version = `node -v`
echo NPM Version = `npm -v`
echo Python Version = `python --version`
echo Gulp Version = `gulp --version`
condition: and(succeeded(), eq(variables['system.debug'], 'true'))
displayName: Show Dependency Versions

- task: Gulp@0
displayName: "Compile and check for errors"
inputs:
targets: "prePublishNonBundle"
condition: and(succeeded(), eq(variables['Build'], 'false'))

- bash: npx tslint ./src/**/*.ts{,x}
displayName: "code hygiene"
condition: and(succeeded(), eq(variables['Build'], 'false'))

- bash: |
python -m pip install -U pip
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
failOnStderr: true
displayName: "pip install requirements"
condition: and(succeeded(), eq(variables['Build'], 'true'))

- bash: |
npm install -g vsce
npm run clean
npm run updateBuildNumber -- --buildNumber $BUILD_BUILDID
npm run package
displayName: "Build VSIX"
condition: and(succeeded(), eq(variables['Build'], 'true'))

- task: CopyFiles@2
inputs:
contents: "*.vsix"
targetFolder: $(Build.ArtifactStagingDirectory)
displayName: "Copy VSIX"
condition: and(succeeded(), eq(variables['Build'], 'true'))

- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)
artifactName: VSIX
displayName: "Publish VSIX to Arifacts"
condition: and(succeeded(), eq(variables['Build'], 'true'))
73 changes: 73 additions & 0 deletions build/ci/templates/uitest_phases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
steps:
- bash: |
printenv
displayName: "Show all env vars"
condition: eq(variables['system.debug'], 'true')

- task: NodeTool@0
displayName: "Use Node $(NodeVersion)"
inputs:
versionSpec: $(NodeVersion)

- task: UsePythonVersion@0
displayName: "Setup Python $(PythonVersion) for extension"
inputs:
versionSpec: $(PythonVersion)

- task: Npm@1
displayName: "Use NPM $(NpmVersion)"
inputs:
command: custom
verbose: true
customCommand: "install -g npm@$(NpmVersion)"

- task: Npm@1
displayName: "npm ci"
inputs:
command: custom
verbose: true
customCommand: ci

- bash: |
echo AVAILABLE DEPENDENCY VERSIONS
echo Node Version = `node -v`
echo NPM Version = `npm -v`
echo Python Version = `python --version`
echo Gulp Version = `gulp --version`
condition: and(succeeded(), eq(variables['system.debug'], 'true'))
displayName: Show Dependency Versions

- task: Gulp@0
displayName: "Compile"
inputs:
targets: "prePublishNonBundle"
condition: succeeded()

# https://code.visualstudio.com/api/working-with-extensions/continuous-integration#azure-pipelines
- bash: |
set -e
/usr/bin/Xvfb :10 -ac >> /tmp/Xvfb.out 2>&1 &
disown -ar
displayName: "Start xvfb"
condition: and(succeeded(), eq(variables['Agent.Os'], 'Linux'), not(variables['SkipXvfb']))

- task: DownloadBuildArtifacts@0
inputs:
buildType: "current"
artifactName: "VSIX"
downloadPath: "$(Build.SourcesDirectory)"
displayName: "Restore VSIX"
condition: succeeded()

- task: CopyFiles@2
inputs:
sourceFolder: "$(Build.SourcesDirectory)/VSIX"
targetFolder: $(Build.SourcesDirectory)
displayName: "Copy VSIX"
condition: succeeded()

- bash: npm run testSmoke
displayName: "Run Smoke Tests"
condition: succeeded()
env:
DISPLAY: :10
82 changes: 51 additions & 31 deletions build/ci/vscode-python-ci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: '$(Year:yyyy).$(Month).0.$(BuildID)-ci'
# PR Validation build.
# Notes: Only trigger a PR build for master and release, and skip build/rebuild
# CI build.
# Notes: Only trigger a commit for master and release, and skip build/rebuild
# on changes in the news and .vscode folders.
trigger:
branches:
Expand All @@ -21,6 +21,55 @@ variables:
VSC_PYTHON_FORCE_LOGGING: true # Enable this to turn on console output for the logger

jobs:
- job: Compile
variables:
Build: false
pool:
vmImage: "macos-10.13"
steps:
- template: templates/build.yml

- job: Build
variables:
Build: true
pool:
vmImage: "macos-10.13"
steps:
- template: templates/build.yml

- job: Smoke
dependsOn:
- Compile
- Build

strategy:
matrix:
'Linux-Py3.7':
PythonVersion: '3.7'
VMImageName: 'ubuntu-16.04'
TestsToRun: 'testSmoke'
NeedsPythonTestReqs: true
'Mac-Py3.7':
PythonVersion: '3.7'
VMImageName: 'macos-10.13'
TestsToRun: 'testSmoke'
NeedsPythonTestReqs: true
'Linux-Py2.7':
PythonVersion: '2.7'
VMImageName: 'ubuntu-16.04'
TestsToRun: 'testSmoke'
NeedsPythonTestReqs: true
'Mac-Py2.7':
PythonVersion: '2.7'
VMImageName: 'macos-10.13'
TestsToRun: 'testSmoke'
NeedsPythonTestReqs: true

pool:
vmImage: $(VMImageName)

steps:
- template: templates/uitest_phases.yml

- job: 'CI'

Expand Down Expand Up @@ -217,72 +266,43 @@ jobs:
TestsToRun: 'testDebugger'
NeedsPythonTestReqs: true

# Smoke tests
'Linux-Py3.7 Smoke':
PythonVersion: '3.7'
VMImageName: 'ubuntu-16.04'
TestsToRun: 'testSmoke'
NeedsPythonTestReqs: true
'Mac-Py3.7 Smoke':
PythonVersion: '3.7'
VMImageName: 'macos-10.13'
TestsToRun: 'testSmoke'
NeedsPythonTestReqs: true
'Linux-Py3.6 Smoke':
PythonVersion: '3.6'
VMImageName: 'ubuntu-16.04'
TestsToRun: 'testSmoke'
NeedsPythonTestReqs: true
'Mac-Py3.6 Smoke':
PythonVersion: '3.6'
VMImageName: 'macos-10.13'
TestsToRun: 'testSmoke'
NeedsPythonTestReqs: true

# Functional tests (not mocked Jupyter)
'Windows-Py3.7 Functional':
PythonVersion: '3.7'
VMImageName: 'vs2017-win2016'
TestsToRun: 'testfunctional'
NeedsPythonTestReqs: true
NeedsPythonFunctionalReqs: true
# This tells the functional tests to not mock out Jupyter...
VSCODE_PYTHON_ROLLING: true
'Linux-Py3.7 Functional':
PythonVersion: '3.7'
VMImageName: 'ubuntu-16.04'
TestsToRun: 'testfunctional'
NeedsPythonTestReqs: true
NeedsPythonFunctionalReqs: true
VSCODE_PYTHON_ROLLING: true
'Mac-Py3.7 Functional':
PythonVersion: '3.7'
VMImageName: 'macos-10.13'
TestsToRun: 'testfunctional'
NeedsPythonTestReqs: true
NeedsPythonFunctionalReqs: true
VSCODE_PYTHON_ROLLING: true
'Windows-Py3.6 Functional':
PythonVersion: '3.6'
VMImageName: 'vs2017-win2016'
TestsToRun: 'testfunctional'
NeedsPythonTestReqs: true
NeedsPythonFunctionalReqs: true
VSCODE_PYTHON_ROLLING: true
'Linux-Py3.6 Functional':
PythonVersion: '3.6'
VMImageName: 'ubuntu-16.04'
TestsToRun: 'testfunctional'
NeedsPythonTestReqs: true
NeedsPythonFunctionalReqs: true
VSCODE_PYTHON_ROLLING: true
'Mac-Py3.6 Functional':
PythonVersion: '3.6'
VMImageName: 'macos-10.13'
TestsToRun: 'testfunctional'
NeedsPythonTestReqs: true
NeedsPythonFunctionalReqs: true
VSCODE_PYTHON_ROLLING: true

pool:
vmImage: $(VMImageName)
Expand Down
4 changes: 2 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ gulp.task('installPythonLibs', async () => {
function uploadExtension(uploadBlobName) {
const azure = require('gulp-azure-storage');
const rename = require("gulp-rename");
return gulp.src('python*.vsix')
return gulp.src('*python*.vsix')
.pipe(rename(uploadBlobName))
.pipe(azure.upload({
account: process.env.AZURE_STORAGE_ACCOUNT,
Expand All @@ -289,7 +289,7 @@ function uploadExtension(uploadBlobName) {
}

gulp.task('uploadDeveloperExtension', () => uploadExtension('ms-python-insiders.vsix'));
gulp.task('uploadReleaseExtension', () => uploadExtension(`ms-python-${process.env.TRAVIS_BRANCH}.vsix`));
gulp.task('uploadReleaseExtension', () => uploadExtension(`ms-python-${process.env.TRAVIS_BRANCH || process.env.BUILD_SOURCEBRANCHNAME}.vsix`));

function spawnAsync(command, args) {
return new Promise((resolve, reject) => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2103,7 +2103,7 @@
}
},
"scripts": {
"package": "gulp clean && gulp prePublishBundle && vsce package",
"package": "gulp clean && gulp prePublishBundle && vsce package -o ms-python-insiders.vsix",
"compile": "tsc -watch -p ./",
"compile-webviews-watch": "npx webpack --config webpack.datascience-ui.config.js --watch",
"dump-datascience-webpack-stats": "webpack --config webpack.datascience-ui.config.js --profile --json > tmp/ds-stats.json",
Expand Down
1 change: 0 additions & 1 deletion src/test/datascience/dataviewer.functional.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { parse } from 'node-html-parser';
import * as React from 'react';
import * as uuid from 'uuid/v4';
import { Disposable } from 'vscode';

import { createDeferred } from '../../client/common/utils/async';
import { Identifiers } from '../../client/datascience/constants';
import { DataViewerMessages } from '../../client/datascience/data-viewing/types';
Expand Down