This repository has been archived by the owner on Apr 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines.yml
34 lines (34 loc) · 1.27 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
variables:
buildConfiguration: 'Release'
trigger:
- master
pr:
- master
pool:
vmImage: 'windows-2019'
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core sdk 3'
inputs:
packageType: sdk
version: 3.1.x
installationPath: $(Agent.ToolsDirectory)/dotnet
- script: dotnet tool install -g dotnet-sonarscanner
displayName: dotnet install sonarscanner
- script: dotnet sonarscanner begin /k:"cdemi_NewsletterCurator" /o:"cdemi-github" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login="$(sonarLogin)" /v:"$(Build.BuildNumber)"
displayName: dotnet sonarscanner begin
- script: dotnet build --configuration $(buildConfiguration)
displayName: dotnet build
- script: dotnet test NewsletterCurator.HTMLScraper.Tests --no-build --no-restore --configuration $(buildConfiguration) --logger trx --collect "Code coverage"
displayName: dotnet test
- script: dotnet sonarscanner end /d:sonar.login="$(sonarLogin)"
displayName: dotnet sonarscanner end
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testRunner: VSTest
testResultsFiles: '**/*.trx'
- script: dotnet publish --configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)
displayName: dotnet publish
- task: PublishBuildArtifacts@1
displayName: Publishing Artifacts