Skip to content

Instantly share code, notes, and snippets.

@riosengineer
Created January 30, 2024 10:48
Show Gist options
  • Save riosengineer/93a66c9f56522f31827e3bc31e7efe7a to your computer and use it in GitHub Desktop.
Save riosengineer/93a66c9f56522f31827e3bc31e7efe7a to your computer and use it in GitHub Desktop.
Azure Bicep Module Pester - PR Pipeline Example
trigger: none
variables:
vmImageName: ubuntu-latest
azureServiceConnection: YOUR_ARM_CONNECTION
pool:
vmImage: $(vmImageName)
stages:
- stage: Validation
displayName: Validation ✅
jobs:
- job: 'PesterTests'
displayName: 'Pester Tests 🧪'
steps:
- task: PowerShell@2
displayName: "Azure Bicep module Pester tests"
inputs:
filePath: './.scripts/bicep-module-pester.ps1'
- task: PublishTestResults@2
displayName: 'Publish Pester results'
condition: always()
inputs:
testResultsFormat: "NUnit"
testResultsFiles: "**/test-Pester.xml"
failTaskOnFailedTests: true
testRunTitle: "Validate Bicep module tests file"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment