Skip to content

Commit 5969fa9

Browse files
committed
Added pipeline to run tests on commit & pr on all branches excluding master
1 parent 3aaa86f commit 5969fa9

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

azure-tests-pipeline.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Starter pipeline
2+
# Start with a minimal pipeline that you can customize to build and deploy your code.
3+
# Add steps that build, run tests, deploy, and more:
4+
# https://aka.ms/yaml
5+
6+
name: "SimplePSLogger Tests"
7+
8+
trigger:
9+
branches:
10+
exclude:
11+
- master
12+
pr:
13+
branches:
14+
exclude:
15+
- master
16+
17+
pool:
18+
vmImage: "ubuntu-latest"
19+
20+
stages:
21+
- stage: Build
22+
jobs:
23+
- job: Build
24+
steps:
25+
- task: PowerShell@2
26+
inputs:
27+
filePath: "./.build/build.ps1"
28+
pwsh: true
29+
- publish: $(Build.SourcesDirectory)
30+
artifact: all
31+
- stage: Test
32+
jobs:
33+
- job: Test
34+
steps:
35+
- checkout: none
36+
- task: DownloadPipelineArtifact@2
37+
inputs:
38+
buildType: "current"
39+
artifactName: "all"
40+
targetPath: "$(Build.SourcesDirectory)"
41+
- task: PowerShell@2
42+
inputs:
43+
targetType: filePath
44+
filePath: "$(Build.SourcesDirectory)/dev-setup.ps1"
45+
pwsh: true
46+
#TODO: Add PSScriptAnalyser
47+
- task: Pester.PesterRunner.Pester-Task.Pester@10
48+
inputs:
49+
scriptFolder: "$(Build.SourcesDirectory)/*"
50+
resultsFile: "$(Build.SourcesDirectory)/SimplePSLogger.Tests.XML"
51+
usePSCore: true
52+
run32Bit: False
53+
- task: PublishTestResults@2
54+
inputs:
55+
testResultsFormat: "NUnit"
56+
testResultsFiles: "$(Build.SourcesDirectory)/SimplePSLogger.Tests.XML"
57+
failTaskOnFailedTests: true

0 commit comments

Comments
 (0)