mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Cleaned up yaml using the redhat yaml linter and azure pipelines schema
This commit is contained in:
parent
014cdac951
commit
d75b1f4ec1
7 changed files with 184 additions and 187 deletions
|
|
@ -14,24 +14,24 @@ pr:
|
|||
include:
|
||||
- main
|
||||
- release/*
|
||||
drafts: false
|
||||
drafts: "false"
|
||||
|
||||
variables:
|
||||
architecture: "x64"
|
||||
python.version: "3.8"
|
||||
architecture: "x64"
|
||||
python.version: "3.8"
|
||||
|
||||
jobs:
|
||||
- job: "Coverage"
|
||||
timeoutInMinutes: 45
|
||||
pool:
|
||||
name: Azure Pipelines
|
||||
demands: java
|
||||
vmImage: "ubuntu-latest"
|
||||
steps:
|
||||
- script: |
|
||||
sudo apt-get update
|
||||
sudo apt-get --yes install gdb
|
||||
sudo sysctl kernel.yama.ptrace_scope=0
|
||||
displayName: "Install gdb"
|
||||
- job: "Coverage"
|
||||
timeoutInMinutes: "45"
|
||||
pool:
|
||||
name: Azure Pipelines
|
||||
demands: java
|
||||
vmImage: "ubuntu-latest"
|
||||
steps:
|
||||
- script: |
|
||||
sudo apt-get update
|
||||
sudo apt-get --yes install gdb
|
||||
sudo sysctl kernel.yama.ptrace_scope=0
|
||||
displayName: "Install gdb"
|
||||
|
||||
- template: "templates/coverage.yml"
|
||||
- template: "templates/coverage.yml"
|
||||
|
|
|
|||
|
|
@ -14,22 +14,21 @@ pr:
|
|||
include:
|
||||
- main
|
||||
- release/*
|
||||
drafts: false
|
||||
drafts: "false"
|
||||
|
||||
variables:
|
||||
architecture: "x64"
|
||||
python.version: "3.8"
|
||||
architecture: "x64"
|
||||
python.version: "3.8"
|
||||
|
||||
jobs:
|
||||
- job: "Coverage"
|
||||
timeoutInMinutes: 45
|
||||
pool:
|
||||
name: Azure Pipelines
|
||||
demands: java
|
||||
vmImage: "macOS-latest"
|
||||
steps:
|
||||
- script: |
|
||||
ulimit -Sn 8192
|
||||
displayName: "Increase file descriptor limit"
|
||||
- job: "Coverage"
|
||||
timeoutInMinutes: "45"
|
||||
pool:
|
||||
name: Azure Pipelines
|
||||
demands: java
|
||||
vmImage: "macOS-latest"
|
||||
steps:
|
||||
- script: "ulimit -Sn 8192"
|
||||
displayName: "Increase file descriptor limit"
|
||||
|
||||
- template: "templates/coverage.yml"
|
||||
- template: "templates/coverage.yml"
|
||||
|
|
|
|||
|
|
@ -15,117 +15,118 @@ pr:
|
|||
include:
|
||||
- main
|
||||
- release/*
|
||||
drafts: false
|
||||
drafts: "false"
|
||||
|
||||
variables:
|
||||
architecture: "x64"
|
||||
|
||||
jobs:
|
||||
|
||||
- job: "Lint"
|
||||
displayName: "Lint"
|
||||
pool: { vmImage: "ubuntu-latest" }
|
||||
- job: "Lint"
|
||||
displayName: "Lint"
|
||||
pool: { vmImage: "ubuntu-latest" }
|
||||
|
||||
variables:
|
||||
python.version: "3.8"
|
||||
variables:
|
||||
python.version: "3.8"
|
||||
|
||||
steps:
|
||||
steps:
|
||||
|
||||
- template: "templates/use_python.yml"
|
||||
- template: "templates/use_python.yml"
|
||||
|
||||
# Install and run ruff
|
||||
# See https://github.com/astral-sh/ruff and https://beta.ruff.rs/docs/
|
||||
- script: python3 -m pip install -U ruff
|
||||
displayName: "Install ruff"
|
||||
# Install and run ruff
|
||||
# See https://github.com/astral-sh/ruff and https://beta.ruff.rs/docs/
|
||||
- script: "python3 -m pip install -U ruff"
|
||||
displayName: "Install ruff"
|
||||
|
||||
# To unblock the build even with lint errors, add "--exit-zero" to the command line
|
||||
- script: python3 -m ruff check --format=junit --output-file=$(Build.ArtifactStagingDirectory)/lint-ruff.xml .
|
||||
displayName: "Run ruff"
|
||||
# To unblock the build even with lint errors, add "--exit-zero" to the command line
|
||||
- script: "python3 -m ruff check --format=junit --output-file=$(Build.ArtifactStagingDirectory)/lint-ruff.xml ."
|
||||
displayName: "Run ruff"
|
||||
|
||||
- task: "PublishTestResults@2"
|
||||
displayName: "Publish linting results"
|
||||
inputs:
|
||||
testRunTitle: "$(Agent.JobName)"
|
||||
testResultsFiles: "lint-*.xml"
|
||||
searchFolder: "$(Build.ArtifactStagingDirectory)"
|
||||
condition: "always()"
|
||||
- task: "PublishTestResults@2"
|
||||
displayName: "Publish linting results"
|
||||
inputs:
|
||||
testRunTitle: "$(Agent.JobName)"
|
||||
testResultsFiles: "lint-*.xml"
|
||||
searchFolder: "$(Build.ArtifactStagingDirectory)"
|
||||
condition: "always()"
|
||||
|
||||
- job: "Test_Linux"
|
||||
timeoutInMinutes: 30
|
||||
displayName: "Tests - Linux"
|
||||
pool: { vmImage: "ubuntu-latest" }
|
||||
- job: "Test_Linux"
|
||||
timeoutInMinutes: "30"
|
||||
displayName: "Tests - Linux"
|
||||
pool: { vmImage: "ubuntu-latest" }
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
py37:
|
||||
python.version: "3.7"
|
||||
py38:
|
||||
python.version: "3.8"
|
||||
py39:
|
||||
python.version: "3.9"
|
||||
py310:
|
||||
python.version: "3.10"
|
||||
strategy:
|
||||
matrix:
|
||||
py37:
|
||||
python.version: "3.7"
|
||||
py38:
|
||||
python.version: "3.8"
|
||||
py39:
|
||||
python.version: "3.9"
|
||||
py310:
|
||||
python.version: "3.10"
|
||||
|
||||
steps:
|
||||
- script: |
|
||||
sudo apt-get update
|
||||
sudo apt-get --yes install gdb
|
||||
sudo sysctl kernel.yama.ptrace_scope=0
|
||||
displayName: "Setup gdb"
|
||||
steps:
|
||||
|
||||
- template: "templates/use_python.yml"
|
||||
- script: |
|
||||
sudo apt-get update
|
||||
sudo apt-get --yes install gdb
|
||||
sudo sysctl kernel.yama.ptrace_scope=0
|
||||
displayName: "Setup gdb"
|
||||
|
||||
- template: "templates/run_tests.yml"
|
||||
- template: "templates/use_python.yml"
|
||||
|
||||
- job: "Test_MacOS"
|
||||
timeoutInMinutes: 30
|
||||
displayName: "Tests - macOS"
|
||||
pool: { vmImage: "macOS-11" }
|
||||
- template: "templates/run_tests.yml"
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
py37:
|
||||
python.version: "3.7"
|
||||
py38:
|
||||
python.version: "3.8"
|
||||
py39:
|
||||
python.version: "3.9"
|
||||
py310:
|
||||
python.version: "3.10"
|
||||
- job: "Test_MacOS"
|
||||
timeoutInMinutes: "30"
|
||||
displayName: "Tests - macOS"
|
||||
pool: { vmImage: "macOS-11" }
|
||||
|
||||
steps:
|
||||
- script: |
|
||||
ulimit -Sn 8192
|
||||
displayName: "Increase file descriptor limit"
|
||||
strategy:
|
||||
matrix:
|
||||
py37:
|
||||
python.version: "3.7"
|
||||
py38:
|
||||
python.version: "3.8"
|
||||
py39:
|
||||
python.version: "3.9"
|
||||
py310:
|
||||
python.version: "3.10"
|
||||
|
||||
- template: "templates/use_python.yml"
|
||||
steps:
|
||||
|
||||
- script: |
|
||||
python -m ensurepip --user
|
||||
displayName: "Bootstrap pip"
|
||||
- script: "ulimit -Sn 8192"
|
||||
displayName: "Increase file descriptor limit"
|
||||
|
||||
- template: "templates/run_tests.yml"
|
||||
- template: "templates/use_python.yml"
|
||||
|
||||
- job: "Test_Windows"
|
||||
timeoutInMinutes: 40
|
||||
displayName: "Tests - Windows"
|
||||
pool: { vmImage: "windows-latest" }
|
||||
- script: "python -m ensurepip --user"
|
||||
displayName: "Bootstrap pip"
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
py37:
|
||||
python.version: "3.7"
|
||||
py38:
|
||||
python.version: "3.8"
|
||||
py39:
|
||||
python.version: "3.9"
|
||||
py310:
|
||||
python.version: "3.10"
|
||||
py39_32:
|
||||
python.version: "3.9"
|
||||
architecture: "x86"
|
||||
- template: "templates/run_tests.yml"
|
||||
|
||||
steps:
|
||||
- template: "templates/use_python.yml"
|
||||
- job: "Test_Windows"
|
||||
timeoutInMinutes: "40"
|
||||
displayName: "Tests - Windows"
|
||||
pool: { vmImage: "windows-latest" }
|
||||
|
||||
- template: "templates/run_tests.yml"
|
||||
strategy:
|
||||
matrix:
|
||||
py37:
|
||||
python.version: "3.7"
|
||||
py38:
|
||||
python.version: "3.8"
|
||||
py39:
|
||||
python.version: "3.9"
|
||||
py310:
|
||||
python.version: "3.10"
|
||||
py39_32:
|
||||
python.version: "3.9"
|
||||
architecture: "x86"
|
||||
|
||||
steps:
|
||||
|
||||
- template: "templates/use_python.yml"
|
||||
|
||||
- template: "templates/run_tests.yml"
|
||||
|
|
|
|||
|
|
@ -1,37 +1,35 @@
|
|||
steps:
|
||||
- template: "use_python.yml"
|
||||
- template: "use_python.yml"
|
||||
|
||||
- script: |
|
||||
python -m pip install -U pip setuptools tox
|
||||
displayName: "Setup Python packages"
|
||||
- script: "python -m pip install -U pip setuptools tox"
|
||||
displayName: "Setup Python packages"
|
||||
|
||||
- task: SonarCloudPrepare@1
|
||||
displayName: "Prepare analysis on SonarCloud"
|
||||
inputs:
|
||||
SonarCloud: "SonarCloud-debugpy"
|
||||
organization: microsoft
|
||||
scannerMode: CLI
|
||||
extraProperties: |
|
||||
sonar.python.coverage.reportPaths=$(Build.SourcesDirectory)/coverage/coverage.xml
|
||||
sonar.projectKey=microsoft_debugpy
|
||||
- task: SonarCloudPrepare@1
|
||||
displayName: "Prepare analysis on SonarCloud"
|
||||
inputs:
|
||||
SonarCloud: "SonarCloud-debugpy"
|
||||
organization: microsoft
|
||||
scannerMode: CLI
|
||||
extraProperties: |
|
||||
sonar.python.coverage.reportPaths=$(Build.SourcesDirectory)/coverage/coverage.xml
|
||||
sonar.projectKey=microsoft_debugpy
|
||||
|
||||
- script: |
|
||||
python -m tox --develop -e py38-cov -- --cov-report=html --cov-report=xml -vv
|
||||
displayName: "Coverage Run"
|
||||
- script: "python -m tox --develop -e py38-cov -- --cov-report=html --cov-report=xml -vv"
|
||||
displayName: "Coverage Run"
|
||||
|
||||
- task: SonarCloudAnalyze@1
|
||||
displayName: "Run Code Analysis"
|
||||
- task: SonarCloudAnalyze@1
|
||||
displayName: "Run Code Analysis"
|
||||
|
||||
- task: SonarCloudPublish@1
|
||||
displayName: "Publish Quality Gate Result"
|
||||
inputs:
|
||||
pollingTimeoutSec: "300"
|
||||
- task: SonarCloudPublish@1
|
||||
displayName: "Publish Quality Gate Result"
|
||||
inputs:
|
||||
pollingTimeoutSec: "300"
|
||||
|
||||
- task: PublishCodeCoverageResults@1
|
||||
displayName: "Publish Coverage Report"
|
||||
inputs:
|
||||
codeCoverageTool: Cobertura
|
||||
summaryFileLocation: "$(Build.SourcesDirectory)/coverage/coverage.xml"
|
||||
reportDirectory: "$(Build.SourcesDirectory)/coverage/html"
|
||||
failIfCoverageEmpty: true
|
||||
condition: always()
|
||||
- task: PublishCodeCoverageResults@1
|
||||
displayName: "Publish Coverage Report"
|
||||
inputs:
|
||||
codeCoverageTool: Cobertura
|
||||
summaryFileLocation: "$(Build.SourcesDirectory)/coverage/coverage.xml"
|
||||
reportDirectory: "$(Build.SourcesDirectory)/coverage/html"
|
||||
failIfCoverageEmpty: true
|
||||
condition: always()
|
||||
|
|
|
|||
|
|
@ -1,28 +1,27 @@
|
|||
steps:
|
||||
- script: |
|
||||
python -m pip install -U pip setuptools tox
|
||||
displayName: "Setup Python packages"
|
||||
- script: "python -m pip install -U pip setuptools tox"
|
||||
displayName: "Setup Python packages"
|
||||
|
||||
- pwsh: |
|
||||
$toxEnv = '$(python.version)'
|
||||
if (-not $toxEnv.startsWith('pypy')) {
|
||||
$toxEnv = 'py' + $toxEnv.Replace('.', '')
|
||||
}
|
||||
echo 'tox environment: $toxEnv'
|
||||
python -m tox -e $toxEnv -- -vv --junitxml=$(Build.ArtifactStagingDirectory)/tests.xml --debugpy-log-dir=$(Build.ArtifactStagingDirectory)/logs tests
|
||||
displayName: "Run tests using tox"
|
||||
- pwsh: |
|
||||
$toxEnv = '$(python.version)'
|
||||
if (-not $toxEnv.startsWith('pypy')) {
|
||||
$toxEnv = 'py' + $toxEnv.Replace('.', '')
|
||||
}
|
||||
echo 'tox environment: $toxEnv'
|
||||
python -m tox -e $toxEnv -- -vv --junitxml=$(Build.ArtifactStagingDirectory)/tests.xml --debugpy-log-dir=$(Build.ArtifactStagingDirectory)/logs tests
|
||||
displayName: "Run tests using tox"
|
||||
|
||||
- task: "PublishBuildArtifacts@1"
|
||||
condition: "failed()"
|
||||
inputs:
|
||||
artifactName: "Test logs"
|
||||
pathToPublish: "$(Build.ArtifactStagingDirectory)/logs"
|
||||
displayName: "Publish test logs"
|
||||
- task: "PublishBuildArtifacts@1"
|
||||
condition: "failed()"
|
||||
inputs:
|
||||
artifactName: "Test logs"
|
||||
pathToPublish: "$(Build.ArtifactStagingDirectory)/logs"
|
||||
displayName: "Publish test logs"
|
||||
|
||||
- task: "PublishTestResults@2"
|
||||
condition: "always()"
|
||||
inputs:
|
||||
testRunTitle: "$(Agent.JobName)"
|
||||
testResultsFiles: "tests.xml"
|
||||
searchFolder: "$(Build.ArtifactStagingDirectory)"
|
||||
displayName: "Publish test results"
|
||||
- task: "PublishTestResults@2"
|
||||
condition: "always()"
|
||||
inputs:
|
||||
testRunTitle: "$(Agent.JobName)"
|
||||
testResultsFiles: "tests.xml"
|
||||
searchFolder: "$(Build.ArtifactStagingDirectory)"
|
||||
displayName: "Publish test results"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
steps:
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: "$(python.version)"
|
||||
architecture: "$(architecture)"
|
||||
displayName: "Use Python $(python.version) $(architecture)"
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: "$(python.version)"
|
||||
architecture: "$(architecture)"
|
||||
displayName: "Use Python $(python.version) $(architecture)"
|
||||
|
|
|
|||
|
|
@ -14,18 +14,18 @@ pr:
|
|||
include:
|
||||
- main
|
||||
- release/*
|
||||
drafts: false
|
||||
drafts: "false"
|
||||
|
||||
variables:
|
||||
architecture: "x64"
|
||||
python.version: "3.8"
|
||||
architecture: "x64"
|
||||
python.version: "3.8"
|
||||
|
||||
jobs:
|
||||
- job: "Coverage"
|
||||
timeoutInMinutes: 45
|
||||
pool:
|
||||
name: Azure Pipelines
|
||||
demands: java
|
||||
vmImage: "windows-latest"
|
||||
steps:
|
||||
- template: "templates/coverage.yml"
|
||||
- job: "Coverage"
|
||||
timeoutInMinutes: "45"
|
||||
pool:
|
||||
name: Azure Pipelines
|
||||
demands: java
|
||||
vmImage: "windows-latest"
|
||||
steps:
|
||||
- template: "templates/coverage.yml"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue