Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
54 lines (46 sloc) 1.39 KB
parameters:
VmImage: ''
Module: ''
JobName: ''
jobs:
- job: ${{ parameters.JobName }}
displayName: 'Test & Build'
pool:
vmImage: ${{ parameters.VmImage }}
steps:
- task: PowerShell@2
displayName: 'Run PowerShell Script Analyzer'
inputs:
targetType: Inline
script: .\.pipelines\build.ps1 -Analyze -BasePath '.\src'
- task: PowerShell@2
displayName: 'Run Pester tests (individual .ps1 files)'
inputs:
targetType: Inline
script: .\.pipelines\build.ps1 -Test -BasePath '.'
- task: PowerShell@2
displayName: 'Compile module'
inputs:
targetType: Inline
script: .\.pipelines\build.ps1 -Compile -BasePath '.' -Module '${{ parameters.Module }}'
- task: PowerShell@2
displayName: 'Run Pester tests (compiled .psm1)'
inputs:
targetType: Inline
script: .\.pipelines\build.ps1 -Test -BasePath '.'
- task: PublishTestResults@2
displayName: 'Publish test results'
inputs:
testRunner: NUnit
testResultsFiles: '**/TestResults.xml'
condition: succeededOrFailed()
- task: PublishPipelineArtifact@0
displayName: 'Publish compiled module artifact'
inputs:
artifactName: '${{ parameters.Module }}'
targetPath: .\${{ parameters.Module }}
- task: PublishPipelineArtifact@0
displayName: 'Publish meta scripts'
inputs:
artifactName: '_Scripts'
targetPath: .\.pipelines
You can’t perform that action at this time.