@@ -205,140 +205,3 @@ jobs:
205205 Prerelease : ${{ inputs.Prerelease }}
206206 Verbose : ${{ inputs.Verbose }}
207207 Version : ${{ inputs.Version }}
208-
209- # TestModuleStatus:
210- # name: Test module status
211- # if: ${{ contains(fromJson('["success", "skipped"]'), needs.TestModule-pwsh-ubuntu-latest.result) && contains(fromJson('["success", "skipped"]'), needs.TestModule-pwsh-macos-latest.result) && contains(fromJson('["success", "skipped"]'), needs.TestModule-pwsh-windows-latest.result) && !cancelled() }}
212- # needs:
213- # - TestModule-pwsh-ubuntu-latest
214- # - TestModule-pwsh-macos-latest
215- # - TestModule-pwsh-windows-latest
216- # runs-on: ubuntu-latest
217- # steps:
218- # - name: Checkout Code
219- # uses: actions/checkout@v4
220-
221- # - name: Debug
222- # if: ${{ inputs.Debug }}
223- # uses: PSModule/Debug@v0
224-
225- # - name: Initialize environment
226- # uses: PSModule/Initialize-PSModule@v1
227- # with:
228- # Debug: ${{ inputs.Debug }}
229- # Prerelease: ${{ inputs.Prerelease }}
230- # Verbose: ${{ inputs.Verbose }}
231- # Version: ${{ inputs.Version }}
232-
233- # - name: Download module artifact
234- # uses: actions/download-artifact@v4
235- # with:
236- # name: module
237- # path: ${{ inputs.ModulesOutputPath }}
238-
239- # - name: Summerize tests
240- # uses: PSModule/GitHub-Script@v1
241- # with:
242- # Debug: ${{ inputs.Debug }}
243- # Prerelease: ${{ inputs.Prerelease }}
244- # Verbose: ${{ inputs.Verbose }}
245- # Version: ${{ inputs.Version }}
246- # Script: |
247- # LogGroup -Name 'Test analysis' {
248-
249- # $linuxPassed = '${{ needs.TestModule-pwsh-ubuntu-latest.outputs.passed }}' -eq 'true'
250- # $linuxSkipped = '${{ needs.TestModule-pwsh-ubuntu-latest.result }}' -eq 'skipped'
251- # $macOSPassed = '${{ needs.TestModule-pwsh-macos-latest.outputs.passed }}' -eq 'true'
252- # $macOSSkipped = '${{ needs.TestModule-pwsh-macos-latest.result }}' -eq 'skipped'
253- # $windowsPassed = '${{ needs.TestModule-pwsh-windows-latest.outputs.passed }}' -eq 'true'
254- # $windowsSkipped = '${{ needs.TestModule-pwsh-windows-latest.result }}' -eq 'skipped'
255- # $anyPassed = $linuxPassed -or $macOSPassed -or $windowsPassed
256- # $allSkipped = $linuxSkipped -and $macOSSkipped -and $windowsSkipped
257-
258- # $Status = @(
259- # [pscustomobject]@{
260- # Name = 'Linux'
261- # Icon = $linuxSkipped ? '⚠️' : $linuxPassed ? '✅' : '❌'
262- # Status = $linuxSkipped ? 'Skipped' : $linuxPassed ? 'Passed' : 'Failed'
263- # }
264- # [pscustomobject]@{
265- # Name = 'MacOS'
266- # Icon = $macOSSkipped ? '⚠️' : $macOSPassed ? '✅' : '❌'
267- # Status = $macOSSkipped ? 'Skipped' : $macOSPassed ? 'Passed' : 'Failed'
268- # }
269- # [pscustomobject]@{
270- # Name = 'Windows'
271- # Icon = $windowsSkipped ? '⚠️' : $windowsPassed ? '✅' : '❌'
272- # Status = $windowsSkipped ? 'Skipped' : $windowsPassed ? 'Passed' : 'Failed'
273- # }
274- # [pscustomobject]@{
275- # Name = 'Result'
276- # Icon = $allSkipped ? '⚠️' : $anyPassed ? '✅' : '❌'
277- # Status = $allSkipped ? 'Skipped' : $anyPassed ? 'Passed' : 'Failed'
278- # }
279- # )
280-
281- # Write-Host ($Status | Format-Table | Out-String)
282- # ($Status | New-MDTable) | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append
283-
284- # if (-not $anyPassed -and -not $allSkipped) {
285- # Write-Host "::[error]::No tests passed"
286- # exit 1
287- # }
288- # }
289-
290- # LogGroup 'Data' {
291- # $moduleName = [string]::IsNullOrEmpty('${{ inputs.Name }}') ? $env:GITHUB_REPOSITORY_NAME : '${{ inputs.Name }}'
292- # $path = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "${{ inputs.ModulesOutputPath }}/$moduleName"
293- # $moduleManifestPath = Join-Path -Path $Path -ChildPath "$moduleName.psd1"
294-
295- # # Obay module manifest overrides
296- # $sourcePath = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "${{ inputs.Path }}"
297- # $sourceModuleManifestPath = Join-Path -Path $sourcePath -ChildPath "manifest.psd1"
298- # if (Test-Path -Path $sourceModuleManifestPath) {
299- # $sourceManifest = Import-PowerShellDataFile -Path $sourceModuleManifestPath
300- # }
301-
302- # $data = [pscustomobject]@{
303- # ModuleName = $moduleName
304- # Path = $path
305- # ModuleManifestPath = $moduleManifestPath
306- # }
307- # Write-Verbose ($data | Format-List | Out-String) -Verbose
308-
309- # # If the source module manifest has a PowerShellVersion, use that, otherwise use the latest version.
310- # $powerShellVersion = $sourceManifest.PowerShellVersion ?? '7.4'
311- # Set-ModuleManifest -Path $moduleManifestPath -PowerShellVersion $powerShellVersion
312-
313- # Add-ModuleManifestData -Path $moduleManifestPath -CompatiblePSEditions 'Core'
314- # Add-ModuleManifestData -Path $moduleManifestPath -Tags 'PSEdition_Core'
315-
316- # if ($linuxPassed) {
317- # Add-ModuleManifestData -Path $moduleManifestPath -Tags 'Linux'
318- # }
319-
320- # if ($macOSPassed) {
321- # Add-ModuleManifestData -Path $moduleManifestPath -Tags 'MacOS'
322- # }
323-
324- # if ($windowsPassed) {
325- # Add-ModuleManifestData -Path $moduleManifestPath -Tags 'Windows'
326- # }
327- # }
328-
329- # LogGroup 'Module Manifest - Source' {
330- # Show-FileContent -Path $moduleManifestPath
331- # }
332-
333- # LogGroup 'Module Manifest' {
334- # Show-FileContent -Path $moduleManifestPath
335- # }
336-
337- # - name: Upload module artifact
338- # uses: actions/upload-artifact@v4
339- # with:
340- # name: module
341- # path: ${{ inputs.ModulesOutputPath }}
342- # if-no-files-found: error
343- # retention-days: 1
344- # overwrite: true
0 commit comments