-
Notifications
You must be signed in to change notification settings - Fork 31
/
azure-pipelines.yml
47 lines (36 loc) · 1023 Bytes
/
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
pr:
- master
jobs:
- job: BuildAndTest
pool:
vmImage: 'win1803'
steps:
- task: PowerShell@2
displayName: 'Setup Build Environment'
inputs:
targetType: 'inline'
script: |
Install-Module -Name Psake, PSDeploy, BuildHelpers -Force -Scope CurrentUser
Install-Module -Name Pester -Force -SkipPublisherCheck -Scope CurrentUser
errorActionPreference: 'stop'
failOnStderr: true
pwsh: false
- task: PowerShell@2
displayName: 'Run Pester Tests'
inputs:
targetType: 'filePath'
filePath: ./Build/Build.ps1
arguments: -Task Build
errorActionPreference: 'stop'
failOnStderr: true
pwsh: false
- task: PowerShell@2
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/master')
displayName: 'Deploy to Gallery'
inputs:
targetType: 'filePath'
arguments: $(GalleryApiKey)
filePath: ./PSGallery.ps1
errorActionPreference: 'stop'
failOnStderr: true
pwsh: true