Wow #18
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: Pester Tests | |
# Controls when the workflow will run | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: pwsh | |
jobs: | |
Tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📥 Checkout | |
uses: actions/checkout@v4 | |
- name: 📦 Install ModuleTools module form PSGallery | |
run: Install-PSResource -Repository PSGallery -Name ModuleTools -TrustRepository | |
- name: 🏗️ Build Module | |
run: Invoke-MTBuild -Verbose | |
- name: 📝 Generate Report | |
run: | | |
# Get list of files in the dist directory directory | |
$Report = New-MDHeader -Text "Output Files 📁" -Level 2 | |
$Report += Get-ChildItem -Path ./dist -Recurse | Select-Object Name, Directory | New-MDTable | |
echo "$Report" >> $GITHUB_STEP_SUMMARY | |
echo "$Report" | |
- name: 🧪 Run Pester Tests | |
run: Invoke-MTTest |