-
Notifications
You must be signed in to change notification settings - Fork 6
/
azure-pipelines.yml
86 lines (85 loc) · 2.48 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
trigger:
branches:
include:
- main
- release-*
- Release-*
- refs/tags/v*
pr:
- main
- release-*
stages:
- stage: ubuntu_latest
displayName: 'ubuntu-latest'
dependsOn: [ ]
pool:
vmImage: 'ubuntu-latest'
jobs:
- job: Compile
displayName: 'Compile'
dependsOn: [ ]
steps:
- task: CmdLine@2
inputs:
script: './build.sh Restore Compile --skip'
- job: Test
displayName: 'Test'
dependsOn: [ Compile ]
strategy:
parallel: 2
steps:
- task: CmdLine@2
inputs:
script: './build.sh Test --skip --test-partition $(System.JobPositionInPhase)'
- task: PublishBuildArtifacts@1
inputs:
artifactName: test-results
pathtoPublish: 'artifacts/test-results'
- job: Coverage
displayName: 'Coverage'
dependsOn: [ Test ]
steps:
- task: DownloadPipelineArtifact@2
inputs:
artifact: test-results
path: 'artifacts/test-results'
- task: CmdLine@2
inputs:
script: './build.sh Coverage --skip'
- task: PublishBuildArtifacts@1
inputs:
artifactName: coverage-report
pathtoPublish: 'artifacts/coverage-report.zip'
- job: AcceptanceTest
displayName: 'Acceptance Test'
dependsOn: [ Test ]
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.7'
inputs:
versionSpec: '3.7'
- script: './build.sh AcceptanceTest --skip'
displayName: 'Execute Acceptance Test'
- job: Pack
displayName: 'Pack'
dependsOn: [ Compile, Test, AcceptanceTest ]
steps:
- task: CmdLine@2
inputs:
script: './build.sh Pack --skip'
- task: PublishBuildArtifacts@1
inputs:
artifactName: packages
pathtoPublish: 'artifacts/packages'
- job: Publish
displayName: 'Publish'
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/v')
dependsOn: [ Pack ]
steps:
- task: DownloadPipelineArtifact@2
inputs:
artifact: packages
path: 'artifacts/packages'
- task: CmdLine@2
inputs:
script: './build.sh Publish --api-key $(NUGET_TOKEN) --skip'