-
Notifications
You must be signed in to change notification settings - Fork 10
/
azure-pipelines.yml
70 lines (62 loc) · 1.84 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
# Thanks to Stefan Stranger
# https://stefanstranger.github.io/2018/12/30/UseAzurePipelinesToPublishPowerShellModule/
trigger:
branches:
include:
- master
paths:
include:
- /src/PoshNotify.psd1
jobs:
- job: macOS
pool:
vmImage: 'macOS-latest'
steps:
- template: azure-template.yml # Template reference
- job: Windows
pool:
vmImage: 'windows-latest'
steps:
- template: azure-template.yml # Template reference
- job: Linux
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
pool:
vmImage: 'ubuntu-latest'
steps:
- template: azure-template.yml # Template reference
- job: Linux_Coverage
displayName: 'Linux (/w Coverage)'
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
pool:
vmImage: 'ubuntu-latest'
steps:
- task: PowerShell@2
displayName: 'Run tests & coverage'
inputs:
targetType: Inline
script: ./build.ps1 -Bootstrap -Test -Coverage
- task: PublishTestResults@2
inputs:
testRunner: NUnit
testResultsFiles: '**/TestResults.xml'
condition: succeededOrFailed()
- task: Bash@3
inputs:
targetType: 'filePath' # Optional. Options: filePath, inline
filePath: ./codecov.sh
arguments: -f coverage.json -t $(CODECOV_TOKEN)
#script: '# Write your commands here# Use the environment variables input below to pass secret variables to this script' # Required when targetType == Inline
#workingDirectory: # Optional
#failOnStderr: false # Optional
- job: Publish
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
pool:
vmImage: 'windows-latest'
steps:
- task: PowerShell@2
displayName: 'Run publish task'
env:
psgallery: $(NugetAPIKey)
inputs:
targetType: Inline
script: ./build.ps1 -Publish