mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Merge pull request #34 from karthiknadig/sonarcloud
Enable sonar cloud analysis
This commit is contained in:
commit
b3ba09467a
1 changed files with 22 additions and 4 deletions
|
|
@ -2,18 +2,36 @@ steps:
|
|||
- template: "use_python.yml"
|
||||
|
||||
- script: |
|
||||
python -m pip install -U pip setuptools tox
|
||||
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
|
||||
|
||||
- script: |
|
||||
python -m tox --develop -e py38-cov -- --cov-report=html --cov-report=xml -vv
|
||||
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: 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'
|
||||
summaryFileLocation: '$(Build.SourcesDirectory)/coverage/coverage.xml'
|
||||
reportDirectory: '$(Build.SourcesDirectory)/coverage/html'
|
||||
failIfCoverageEmpty: true
|
||||
condition: always()
|
||||
Loading…
Add table
Add a link
Reference in a new issue