Hero Image and Attribution #148
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: BurntToast CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - 'release\/v[0-9]+.[0-9]+.[0-9]+' | |
| pull_request: | |
| branches: | |
| - main | |
| - 'release\/v[0-9]+.[0-9]+.[0-9]+' | |
| jobs: | |
| Win2025-x64-pwsh: | |
| name: Server 2025 - PowerShell - x64 | |
| runs-on: windows-2025 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Perform a Pester test from the command-line | |
| shell: pwsh | |
| run: ./tasks/build.ps1 -Test | |
| Win2025-x86-pwsh: | |
| name: Server 2025 - PowerShell - x86 | |
| runs-on: windows-2025 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Perform a Pester test from the command-line | |
| shell: pwsh | |
| run: | | |
| $Pwsh32 = .github/workflows/pwsh32.ps1 | |
| & $Pwsh32 -File ./tasks/build.ps1 -Test | |
| Win2025-x64-winpwsh: | |
| name: Server 2025 - Windows PowerShell - x64 | |
| runs-on: windows-2025 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Perform a Pester test from the command-line | |
| shell: powershell | |
| run: ./tasks/build.ps1 -Test | |
| Win2025-x86-winpwsh: | |
| name: Server 2025 - Windows PowerShell - x86 | |
| runs-on: windows-2025 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Perform a Pester test from the command-line | |
| shell: powershell | |
| # TODO: This could be problematic with hardcoding | |
| run: C:\Windows\syswow64\WindowsPowerShell\v1.0\powershell.exe -File ./tasks/build.ps1 -Test | |
| build-and-oat-module: | |
| name: Build Module and OAT | |
| needs: ["Win2025-x64-pwsh", "Win2025-x64-winpwsh", "Win2025-x86-pwsh", "Win2025-x86-winpwsh"] | |
| runs-on: windows-2025 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 2 | |
| - name: Test Coverage | |
| shell: pwsh | |
| run: | | |
| ./tasks/build.ps1 -Test | |
| - name: Compile Module | |
| shell: pwsh | |
| run: ./tasks/build.ps1 -Compile | |
| - name: OAT | |
| shell: pwsh | |
| env: | |
| # Use the compiled module for testing | |
| BURNTTOAST_MODULE_ROOT: './Output/BurntToast/BurntToast.psd1' | |
| run: | | |
| ./tasks/build.ps1 -Test | |
| - name: Upload Test Results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results | |
| path: "*.xml" | |
| - name: Upload PowerShell Module | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: burnttoast-module | |
| path: "./Output/BurntToast/" | |
| publish-test-results: | |
| name: "Publish Tests Results" | |
| needs: build-and-oat-module | |
| runs-on: ubuntu-latest | |
| if: always() | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: test-results | |
| path: artifacts | |
| - name: Publish Unit Test Results | |
| uses: EnricoMi/publish-unit-test-result-action@v2 | |
| with: | |
| files: artifacts/**/TestResults.xml |