Skip to content

Restored nav

Restored nav #86

# Run pester tests
name: build-validation
on:
workflow_dispatch:
workflow_call:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
permissions:
contents: read
checks: write
jobs:
build-validation:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v3
- name: Install PowerShell dependencies
shell: pwsh
run: |
Install-Module PSFramework -Force -SkipPublisherCheck -Scope CurrentUser -AllowClobber
Install-Module PSModuleDevelopment -Force -SkipPublisherCheck -Scope CurrentUser -AllowClobber
Install-Module Microsoft.Graph.Authentication -Force -SkipPublisherCheck -Scope CurrentUser -AllowClobber
- name: Install PowerShell dependencies (Windows PowerShell)
if: runner.os == 'Windows'
shell: powershell
run: |
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module PSFramework -Force -SkipPublisherCheck -Scope CurrentUser -AllowClobber
Install-Module PSModuleDevelopment -Force -SkipPublisherCheck -Scope CurrentUser -AllowClobber
Install-Module Microsoft.Graph.Authentication -Force -SkipPublisherCheck -Scope CurrentUser -AllowClobber
- name: Run Pester tests
shell: pwsh
run: |
./powershell/tests/pester.ps1
- name: Publish Pester test results
uses: dorny/test-reporter@v1
if: always()
with:
name: Maester Test Results (${{ runner.os }}/PowerShell)
path: TestResults/*.xml
reporter: java-junit
fail-on-error: true
- name: Run Tests using Windows PowerShell
if: runner.os == 'Windows'
shell: powershell
run: |
# Remove old test results
Remove-Item -Path TestResults -Recurse -Force -ErrorAction SilentlyContinue
# Run Pester tests on Windows PowerShell
./powershell/tests/pester.ps1
- name: Publish Pester test results (Windows PowerShell)
uses: dorny/test-reporter@v1
if: runner.os == 'Windows'
with:
name: Maester Test Results Windows PowerShell
path: TestResults/*.xml
reporter: java-junit
fail-on-error: true