forked from jpdillingham/Soulseek.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
55 lines (55 loc) · 2.24 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
variables:
buildConfiguration: 'Release'
jobs:
- job: Windows
pool:
vmImage: 'vs2017-win2016'
steps:
- task: SonarSource.sonarcloud.14d9cde6-c1da-4d55-aa01-2965cd301255.SonarCloudPrepare@1
displayName: 'Prepare analysis on SonarCloud'
inputs:
SonarCloud: SonarCloud
organization: 'jpdillingham-github'
projectKey: 'jpdillingham_Soulseek.NET'
projectName: Soulseek.NET
extraProperties: |
sonar.cs.opencover.reportsPaths=$(Build.SourcesDirectory)/out/Coverage/coverage.opencover.xml
- powershell: |
.\build.ps1 -Target "BuildWithCoverageReport"
displayName: 'Run build script'
- task: SonarSource.sonarcloud.ce096e50-6155-4de8-8800-4221aaeed4a1.SonarCloudAnalyze@1
displayName: 'Run SonarCloud code analysis'
- task: PublishTestResults@2
inputs:
testRunner: VSTest
testResultsFiles: 'out/TestResults/**/*.trx'
displayName: 'Publish test results'
# this task enables the code coverage functionality in Azure Devops. AD does not currently support opencover, and SonarQube doesn't support cobertura, so this is disabled for now.
# uncomment this if AD ever adds opencover support.
# - task: PublishCodeCoverageResults@1
# inputs:
# summaryFileLocation: $(Build.SourcesDirectory)/out/Coverage/coverage.opencover.xml
# reportDirectory: $(Build.SourcesDirectory)/out/CoverageReport
# codecoverageTool: opencover
# displayName: 'Publish code coverage report'
- script: |
%USERPROFILE%\.nuget\packages\codecov\1.1.0\tools\codecov.exe --branch $(Build.SourceBranchName) -f $(Build.SourcesDirectory)/out/Coverage/coverage.opencover.xml -t $(CODECOV_TOKEN)
displayName: 'Upload coverage to codecov.io'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: './out/Packages/'
ArtifactName: Packages
ArtifactType: Container
- job: Linux
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: ShellScript@2
inputs:
scriptPath: build.sh
displayName: 'Run build script'
- task: PublishTestResults@2
inputs:
testRunner: VSTest
testResultsFiles: 'out/TestResults/**/*.trx'
displayName: 'Publish test results'