feat: Add link to PowerShell document #104
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: RunPesterTests | |
on: | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
permissions: | |
contents: read # Update permissions to allow reading | |
jobs: | |
build: | |
permissions: | |
contents: read # Update permissions to allow reading | |
name: RunPesterTests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Set up Git | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
- name: Set Error Environment Variable | |
run: | | |
echo "ERROR_DETECTED=false" >> $GITHUB_ENV | |
- name: Install PowerShell Module Dependencies from PSGallery | |
run: | | |
Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted | |
Install-Module -Name 'Az.ResourceGraph', 'Az.Accounts' | |
shell: pwsh | |
continue-on-error: true | |
- name: Run advisor.psm1 Pester Tests | |
run: | | |
pwsh .github/scripts/RunPesterTests.ps1 -moduleName advisor | |
shell: pwsh | |
continue-on-error: true | |
- name: Run collector.psm1 Pester Tests | |
run: | | |
pwsh .github/scripts/RunPesterTests.ps1 -moduleName collector | |
shell: pwsh | |
continue-on-error: true | |
- name: Run outage.psm1 Pester Tests | |
run: | | |
pwsh .github/scripts/RunPesterTests.ps1 -moduleName outage | |
shell: pwsh | |
continue-on-error: true | |
- name: Run retirement.psm1 Pester Tests | |
run: | | |
pwsh .github/scripts/RunPesterTests.ps1 -moduleName retirement | |
shell: pwsh | |
continue-on-error: true | |
- name: Run scope.psm1 Pester Tests | |
run: | | |
pwsh .github/scripts/RunPesterTests.ps1 -moduleName scope | |
shell: pwsh | |
continue-on-error: true | |
- name: Run servicehealth.psm1 Pester Tests | |
run: | | |
pwsh .github/scripts/RunPesterTests.ps1 -moduleName servicehealth | |
shell: pwsh | |
continue-on-error: true | |
- name: Run support.psm1 Pester Tests | |
run: | | |
pwsh .github/scripts/RunPesterTests.ps1 -moduleName support | |
shell: pwsh | |
continue-on-error: true | |
- name: Run utils.psm1 Pester Tests | |
run: | | |
pwsh .github/scripts/RunPesterTests.ps1 -moduleName utils | |
shell: pwsh | |
continue-on-error: true | |
- name: Check for Failures | |
run: | | |
if ($env:ERROR_DETECTED -ne "false") { | |
Write-Host "Errors detected in Pester tests. Check Pester test console log for more information." | |
exit 1 | |
} | |
shell: pwsh |