-
Notifications
You must be signed in to change notification settings - Fork 13
/
azure-pipelines.yml
55 lines (51 loc) · 1.91 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
pool:
name: Default
variables:
BuildConfiguration: 'Release'
steps:
- script: |
dotnet clean Apex.Serialization/Apex.Serialization.csproj -c $(BuildConfiguration)
dotnet build Apex.Serialization/Apex.Serialization.csproj -c $(BuildConfiguration)
dotnet clean DeserializeTest/DeserializeTest.csproj
dotnet build DeserializeTest/DeserializeTest.csproj
dotnet clean DeserializeTest2/DeserializeTest2.csproj
dotnet build DeserializeTest2/DeserializeTest2.csproj
displayName: 'dotnet build'
- task: DeleteFiles@1
inputs:
Contents: '**/*.trx'
- task: DeleteFiles@1
inputs:
Contents: '**/*.cobertura.xml'
- script: |
dotnet clean Tests/Apex.Serialization.Tests/Apex.Serialization.Tests.csproj -c Debug
dotnet clean Tests/Apex.Serialization.Tests/Apex.Serialization.Tests.csproj -c Release
dotnet test Tests/Apex.Serialization.Tests/Apex.Serialization.Tests.csproj -c Debug --logger "trx;LogFileName=results.trx" /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:Include="[Apex.*]*" /p:UseSourceLink=true
dotnet test Tests/Apex.Serialization.Tests/Apex.Serialization.Tests.csproj -c Release --logger "trx;LogFileName=results.trx"
displayName: 'dotnet test'
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage'
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '**/*.cobertura.xml'
failIfCoverageEmpty: true
- task: PublishTestResults@2
inputs:
testResultsFormat: 'VSTest'
testResultsFiles: '**/results*.trx'
mergeTestResults: true
failTaskOnFailedTests: true
testRunTitle: 'Unit tests'
- task: DotNetCoreCLI@2
displayName: 'dotnet pack'
inputs:
command: pack
packagesToPack: 'Apex.Serialization/Apex.Serialization.csproj'
nobuild: true
versioningScheme: byPrereleaseNumber
verbosityPack: Minimal
- task: DotNetCoreCLI@2
displayName: 'dotnet push'
inputs:
command: push
publishVstsFeed: 'Main'