Skip to content

Commit

Permalink
Hello
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
HamiedAsadi committed Mar 7, 2023
1 parent 8580713 commit 1b862ed
Showing 1 changed file with 9 additions and 61 deletions.
70 changes: 9 additions & 61 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,68 +1,16 @@
# Starter pipeline


trigger:
- none
- DebugPME

pool:
vmImage: 'ubuntu-latest'

vmImage: ubuntu-latest

steps:
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 2.1.505 for SonarCloud'
inputs:
version: '2.1.505'

- task: DotNetCoreCLI@2
inputs:
command: 'restore'
projects: '**/*.csproj'
feedsToUse: 'select'

# Add SonarCloud Prepare

- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: '**/*.csproj'

- task: DotNetCoreCLI@2
displayName: 'Install ReportGenerator'
inputs:
command: custom
custom: tool
arguments: 'install --global dotnet-reportgenerator-globaltool'

- task: DotNetCoreCLI@2
displayName: 'Run unit tests'
inputs:
command: 'test'
arguments: '--no-build --configuration Debug /p:CollectCoverage=true /p:CoverletOutputFormat="cobertura%2copencover" /p:CoverletOutput=$(Build.SourcesDirectory)/TestResults/Coverage/'
publishTestResults: true
projects: '**/*Tests.csproj'
- script: echo Hello, world!
displayName: 'Run a one-line script'

- script: |
reportgenerator -reports:$(Build.SourcesDirectory)/**/coverage.cobertura.xml -targetdir:$(Build.SourcesDirectory)/CodeCoverage -reporttypes:HtmlInline_AzurePipelines
displayName: 'Create code coverage report'

# SonarCloudAnalyze
# SonarCloudPublish

- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage report'
inputs:
codeCoverageTool: 'cobertura'
summaryFileLocation: '$(Build.SourcesDirectory)/**/coverage.cobertura.xml'

- task: CopyFiles@2
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)/SonarCloud/bin'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)'

- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'

- script: echo All done
displayName: 'All done'
echo Add other tasks to build, test, and deploy your project.
displayName: 'Run a multi-line script'

0 comments on commit 1b862ed

Please sign in to comment.