-
Notifications
You must be signed in to change notification settings - Fork 38
/
azure-pipelines.yml
51 lines (48 loc) · 1.31 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
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
buildConfiguration: 'Release'
steps:
- task: UseDotNet@2
displayName: 'Setup dotnet SDK'
inputs:
packageType: sdk
version: '7.x'
- task: DotNetCoreCLI@2
displayName: 'dotnet test'
inputs:
command: test
arguments: '--configuration $(BuildConfiguration) --filter "Category = Unit" /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura'
projects: '**/*.Tests.csproj'
- task: PublishTestResults@2
displayName: 'Publish test result'
inputs:
testResultsFormat: 'XUnit'
testResultsFiles: '**/coverage.cobertura.xml'
failTaskOnFailedTests: true
- task: gitversion/setup@0
displayName: 'GitVersion setup'
inputs:
versionSpec: '6.x'
includePrerelease: true
- task: gitversion/execute@0
displayName: 'Determine Version'
inputs:
useConfigFile: true
configFilePath: ./GitVersion.yml
- task: DotNetCoreCLI@2
displayName: 'dotnet pack'
inputs:
command: 'pack'
packagesToPack: '**/PokeApiNet.csproj'
versioningScheme: 'byEnvVar'
versionEnvVar: 'GitVersion.SemVer'
configuration: $(buildConfiguration)
- task: PublishBuildArtifacts@1
displayName: 'Publish artifacts'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'