Prepare 2.0.0.32 release #1
Workflow file for this run
This file contains hidden or 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: Build and Test | |
| on: | |
| pull_request: | |
| branches: | |
| - dev | |
| - master | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| permissions: write-all | |
| # Only when run from the main repo | |
| if: github.repository == 'Microsoft365DSC/ReverseDSC' | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Install Modules | |
| shell: pwsh | |
| run: | | |
| Install-PSResource -Name Pester -Scope AllUsers -TrustRepository | |
| - name: Run Pester Tests | |
| shell: pwsh | |
| run: | | |
| $results = Invoke-Pester -Path .\Tests\ReverseDSC.Core.Tests.ps1 -CI -PassThru | |
| if ($results.FailedCount -gt 0) | |
| { | |
| throw "{$($results.FailedCount)} Unit Test(s) Failed" | |
| } | |
| - name: Validate Module Manifest | |
| shell: pwsh | |
| run: | | |
| Test-ModuleManifest -Path ./ReverseDSC.psd1 | |
| - name: Validate Module Import | |
| shell: pwsh | |
| run: | | |
| Import-Module ./ReverseDSC.psd1 -Force -ErrorAction Stop | |
| $exportedFunctions = (Get-Module ReverseDSC).ExportedFunctions.Keys | |
| if ($exportedFunctions.Count -eq 0) | |
| { | |
| throw "No functions exported from the ReverseDSC module." | |
| } | |
| Write-Host "Exported functions: $($exportedFunctions -join ', ')" |