Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

---

| macOS/Windows CI | Linux CI | Rolling CI (macOS/Windows) | Code Coverage |
| macOS/Linux/Windows CI | Linux CI | Nightly CI (macOS/Linux/Windows) | Code Coverage |
|-|-|-|-|
|[![Build Status](https://vscode-python.visualstudio.com/VSCode-Python/_apis/build/status/vscode-python-ci-pr_validation)](https://vscode-python.visualstudio.com/VSCode-Python/_build/latest?definitionId=18) | [![Build Status (Travis)](https://travis-ci.org/Microsoft/vscode-python.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-python/branches) | [![Build status](https://vscode-python.visualstudio.com/VSCode-Python/_apis/build/status/VSCode-Python-Rolling-CI)](https://vscode-python.visualstudio.com/VSCode-Python/_build/latest?definitionId=9) | [![codecov](https://codecov.io/gh/Microsoft/vscode-python/branch/master/graph/badge.svg)](https://codecov.io/gh/Microsoft/vscode-python)|
| [![Build Status](https://dev.azure.com/ms/vscode-python/_apis/build/status/PR%20Validation?branchName=master)](https://dev.azure.com/ms/vscode-python/_build/latest?definitionId=84&branchName=master) | [![Build Status (Travis)](https://travis-ci.org/Microsoft/vscode-python.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-python/branches) | [![Build Status](https://dev.azure.com/ms/vscode-python/_apis/build/status/Nightly%20Build?branchName=master)](https://dev.azure.com/ms/vscode-python/_build/latest?definitionId=85&branchName=master) | [![codecov](https://codecov.io/gh/Microsoft/vscode-python/branch/master/graph/badge.svg)](https://codecov.io/gh/Microsoft/vscode-python)|

[[Development build](https://pvsc.blob.core.windows.net/extension-builds/ms-python-insiders.vsix)]

Expand Down Expand Up @@ -37,7 +37,7 @@ npm ci
python3 -m venv .venv
# Activate the virtual environment as appropriate for your shell.
python3 -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
# Optionally Update `launch.json` to set a value for the environment variable `CI_PYTHON_PATH` pointing to the fully qualified path of the above interpreter.
# Optionally Update `launch.json` to set a value for the environment variable `CI_PYTHON_PATH` pointing to the fully qualified path of the above interpreter.
```
You may see warnings that ```The engine "vscode" appears to be invalid.```, you can ignore these.

Expand Down
58 changes: 0 additions & 58 deletions build/ci/mocha-vsts-reporter.js

This file was deleted.

59 changes: 19 additions & 40 deletions build/ci/templates/compile-and-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ parameters:
NpmVersion: 'latest'
pool:
name: 'Hosted Ubuntu 1604'
MOCHA_CI_REPORTER_ID: '$(Build.SourcesDirectory)/build/ci/mocha-vsts-reporter.js'
MOCHA_CI_REPORTER_ID: ''
MOCHA_CI_REPORTFILE: '$(Build.ArtifactStagingDirectory)/reports/junit-report.xml'
MOCHA_REPORTER_JUNIT: true
MOCHA_REPORTER_JUNIT: false
RunHygiene: true
UploadBinary: false
AzureStorageAccountName: 'vscodepythonci'
Expand Down Expand Up @@ -39,11 +39,11 @@ jobs:
condition: variables['system.debug']


- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'

continueOnError: true
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
# - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
# displayName: 'Component Detection'
#
# continueOnError: true
# condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))


- task: NodeTool@0
Expand Down Expand Up @@ -104,24 +104,11 @@ jobs:
condition: and(succeeded(), eq(variables['runHygiene'], 'true'))


- task: Npm@1
displayName: 'run cover:enable'
inputs:
command: custom

verbose: false

customCommand: 'run cover:enable'


- task: Npm@1
displayName: 'run test:unittests'
inputs:
command: custom

verbose: false
- bash: |
npm run cover:enable
npm run test:unittests:cover

customCommand: 'run test:unittests:cover'
displayName: 'run test:unittests:cover'


- bash: 'bash <(curl -s https://codecov.io/bash) -t $(COV_UUID)'
Expand All @@ -140,32 +127,24 @@ jobs:
buildConfiguration: 'Unittests'


- task: CmdLine@1
displayName: 'pip upgrade pip'
inputs:
filename: python

arguments: '-m pip install --upgrade "pip<19"'
- bash: |
python -m pip install --upgrade pip

displayName: 'pip upgrade pip'

- task: CmdLine@1
displayName: 'pip install test requirements'
inputs:
filename: python

arguments: '-m pip install --upgrade -r ./build/test-requirements.txt'
- bash: |
python -m pip install --upgrade -r ./build/test-requirements.txt

displayName: 'pip install test-requirements'

- bash: 'python pythonFiles/tests/run_all.py'
displayName: 'run pythonFiles unit tests'

- bash: |
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt

- task: CmdLine@1
displayName: 'pip install python packages'
inputs:
filename: python

arguments: '-m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt'


- task: ArchiveFiles@2
Expand Down
4 changes: 2 additions & 2 deletions build/ci/templates/test-phase-job-3-4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ parameters:
NodeVersion: '8.11.2'
NpmVersion: 'latest'
PoolName: 'Hosted Ubuntu 1604'
MOCHA_CI_REPORTER_ID: '$(Build.SourcesDirectory)/build/ci/mocha-vsts-reporter.js'
MOCHA_CI_REPORTER_ID: ''
MOCHA_CI_REPORTFILE: '$(Build.ArtifactStagingDirectory)/reports/junit-report.xml'
MOCHA_REPORTER_JUNIT: true
#MOCHA_REPORTER_JUNIT: false
UploadBinary: false
AzureStorageAccountName: 'vscodepythonci'
AzureStorageContainerName: 'vscode-python-ci'
Expand Down
6 changes: 3 additions & 3 deletions build/ci/templates/test-phase-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ parameters:
NodeVersion: '8.11.2'
NpmVersion: 'latest'
PoolName: 'Hosted Ubuntu 1604'
MOCHA_CI_REPORTER_ID: '$(Build.SourcesDirectory)/build/ci/mocha-vsts-reporter.js'
MOCHA_CI_REPORTER_ID: ''
MOCHA_CI_REPORTFILE: '$(Build.ArtifactStagingDirectory)/reports/junit-report.xml'
MOCHA_REPORTER_JUNIT: true
#MOCHA_REPORTER_JUNIT: false
UploadBinary: false
AzureStorageAccountName: 'vscodepythonci'
AzureStorageContainerName: 'vscode-python-ci'
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
Debugger:
TestSuiteName: 'testDebugger'
Functional:
TestSuiteName: 'test:functional -- --reporter=mocha-junit-reporter --reporter-options mochaFile=${{ parameters.MOCHA_CI_REPORTFILE }}'
TestSuiteName: 'test:functional -- --reporter-options mochaFile=${{ parameters.MOCHA_CI_REPORTFILE }}'
HasFunctionalRequirements: 'true'


Expand Down
106 changes: 52 additions & 54 deletions build/ci/templates/test-phase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
# PythonVersion: '3.7'
# NodeVersion: '8.11.2'
# NpmVersion: 'latest'
# MOCHA_CI_REPORTER_ID: '$(Build.SourcesDirectory)/build/ci/mocha-vsts-reporter.js'
# MOCHA_CI_REPORTER_ID: ''
# MOCHA_CI_REPORTFILE: '$(Build.ArtifactStagingDirectory)/reports/junit-report.xml'
# MOCHA_REPORTER_JUNIT: true
# MOCHA_REPORTER_JUNIT: false
# AzureStorageAccountName: 'vscodepythonartifacts'
# AzureStorageContainerName: 'pvsc-ci-yaml-artifacts'

Expand Down Expand Up @@ -113,35 +113,30 @@ steps:
customCommand: ci


- task: CmdLine@1
- bash: |
python -m pip install --upgrade pip

displayName: 'pip upgrade pip'
inputs:
filename: python

arguments: '-m pip install --upgrade "pip<19"'

- bash: |
python -m pip install --upgrade -r ./build/test-requirements.txt

- task: CmdLine@1
displayName: 'pip install requirements'
inputs:
filename: python

arguments: '-m pip install --upgrade -r ./build/test-requirements.txt'

- bash: |
python -m pip install numpy
python -m pip install --upgrade -r ./build/functional-test-requirements.txt

displayName: 'pip install functional requirements'
condition: variables['HasFunctionalRequirements']
condition: eq(variables['HasFunctionalRequirements'], 'true')


- task: CmdLine@1
displayName: 'pip install ptvsd'
inputs:
filename: python
- bash: |
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt

arguments: '-m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt'
displayName: 'pip install ptvsd'


- script: |
Expand All @@ -151,47 +146,50 @@ steps:
displayName: 'Start xvfb'
condition: and(succeeded(), eq(variables['Platform'], 'Linux'))

- bash: |
npm run $(TestSuiteName)
echo "End test run (if we don't get here, we failed to exit from mocha test.)"

- task: Npm@1
displayName: 'run $(TestSuiteName)'
inputs:
command: custom

verbose: true

customCommand: 'run $(TestSuiteName)'
displayName: 'run $(TestSuiteName) [Non-Windows]'
env:
DISPLAY: :10
condition: ne(variables['Platform'], 'Windows')


- task: PythonScript@0
displayName: 'Ensure test results'
inputs:
scriptSource: inline
failOnStderr: true
script: |
from __future__ import print_function

import os
import sys


test_logfile = os.environ.get('MOCHA_CI_REPORTFILE')

if (not os.path.exists(test_logfile)):
print('##vso[task.logissue type=error]Cannot find mocha test results file {}. Did the test run actually fail?'.format(test_logfile))
print('ERROR: Log file could not be found. Ensure test run did not fail.', file=sys.stderr)


- task: PublishTestResults@2
displayName: 'Publish JUnit test results'
condition: always()
inputs:
testResultsFiles: '$(MOCHA_CI_REPORTFILE)'
searchFolder: '$(Build.ArtifactStagingDirectory)'
testRunTitle: '$(Platform) py$(pythonVersion) $(TestSuiteName)'
buildPlatform: '$(Platform)-py$(pythonVersion)'
buildConfiguration: '$(TestSuiteName)'
- powershell: |
npm run $(TestSuiteName)
Write-Host "End test run (if we don't get here, we failed to exit from mocha test.)"

displayName: 'run $(TestSuiteName) [Windows]'
condition: eq(variables['Platform'], 'Windows')

# - task: PythonScript@0
# displayName: 'Ensure test results'
# inputs:
# scriptSource: inline
# failOnStderr: true
# script: |
# from __future__ import print_function
#
# import os
# import sys
#
#
# test_logfile = os.environ.get('MOCHA_CI_REPORTFILE')
#
# if (not os.path.exists(test_logfile)):
# print('##vso[task.logissue type=error]Cannot find mocha test results file {}. Did the test run actually fail?'.format(test_logfile))
# print('ERROR: Log file could not be found. Ensure test run did not fail.', file=sys.stderr)


# - task: PublishTestResults@2
# displayName: 'Publish JUnit test results'
# condition: always()
# inputs:
# testResultsFiles: '$(MOCHA_CI_REPORTFILE)'
# searchFolder: '$(Build.ArtifactStagingDirectory)'
# testRunTitle: '$(Platform) py$(pythonVersion) $(TestSuiteName)'
# buildPlatform: '$(Platform)-py$(pythonVersion)'
# buildConfiguration: '$(TestSuiteName)'


- bash: 'bash <(curl -s https://codecov.io/bash) -t $(COV_UUID) -F $(Platform)'
Expand Down
Loading