From 39c133ec4f67cf6bfdfdedfd0926a4cae0b1f88a Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Thu, 27 Aug 2026 22:47:03 +0200 Subject: [PATCH 1/2] Migrate Process-PSModule caller workflow to v8 Adopt the canonical v8 caller from the Process-PSModule v8.0.3 docs, replacing the v5.5.0 pin. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/Process-PSModule.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/Process-PSModule.yml b/.github/workflows/Process-PSModule.yml index 67f2c25..1181c77 100644 --- a/.github/workflows/Process-PSModule.yml +++ b/.github/workflows/Process-PSModule.yml @@ -4,6 +4,9 @@ on: workflow_dispatch: schedule: - cron: '0 0 * * *' + push: + branches: + - main pull_request: branches: - main @@ -13,19 +16,21 @@ on: - reopened - synchronize - labeled + - unlabeled concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: false permissions: - contents: write - pull-requests: write - statuses: write + contents: read pages: write id-token: write jobs: Process-PSModule: - uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@11117919e65242d3388727819a751f74ad24ea9e # v5.5.0 - secrets: inherit + uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v8 + secrets: + PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }} + GitHubAppClientId: ${{ secrets.SHELLY_CLIENT_ID }} + GitHubAppPrivateKey: ${{ secrets.SHELLY_PRIVATE_KEY }} From 077e11c438a1379f30a0a5cbf3091f60be04e9b1 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Thu, 27 Aug 2026 22:55:52 +0200 Subject: [PATCH 2/2] Migrate tests to Pester 6 syntax Adopt the Pester 6.1.x Should-* assertions and add the version guard required by the Process-PSModule v8 test contract. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- tests/Fonts.Tests.ps1 | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/tests/Fonts.Tests.ps1 b/tests/Fonts.Tests.ps1 index a318089..7074ab6 100644 --- a/tests/Fonts.Tests.ps1 +++ b/tests/Fonts.Tests.ps1 @@ -1,66 +1,71 @@ -Describe 'Fonts' { +#Requires -Modules @{ ModuleName = 'Pester'; ModuleVersion = '6.1.0'; MaximumVersion = '6.*' } + +[Diagnostics.CodeAnalysis.SuppressMessageAttribute( + 'PSUseDeclaredVarsMoreThanAssignments', '', + Justification = 'Required for Pester tests' +)] +[CmdletBinding()] +param() + +Describe 'Fonts' { Context 'Function: Get-Font' { It 'The function should be available' { - Get-Command -Name 'Get-Font' | Should -Not -BeNull + Get-Command -Name 'Get-Font' | Should-NotBeNull } Context 'CurrentUser' { It 'Should return a list of fonts' { - { - $fonts = Get-Font -Verbose - Write-Verbose ($fonts | Out-String) -Verbose - } | Should -Not -Throw + $fonts = Get-Font -Verbose + Write-Verbose ($fonts | Out-String) -Verbose } } Context 'AllUsers' { It 'Should return a list of fonts' { - { - $fonts = Get-Font -Scope AllUsers -Verbose - Write-Verbose ($fonts | Out-String) -Verbose - } | Should -Not -Throw + $fonts = Get-Font -Scope AllUsers -Verbose + Write-Verbose ($fonts | Out-String) -Verbose } } } Context 'Function: Install-Font' { It 'Should be available' { - Get-Command -Name 'Install-Font' | Should -Not -BeNull + Get-Command -Name 'Install-Font' | Should-NotBeNull } It 'Should install a font' { $fontPath = Join-Path -Path $PSScriptRoot -ChildPath 'Fonts/CascadiaCodePL.ttf' - { Install-Font -Path $fontPath -Verbose } | Should -Not -Throw + Install-Font -Path $fontPath -Verbose Write-Verbose "Installed font: 'CascadiaCodePL'" -Verbose Write-Verbose (Get-Font | Out-String) -Verbose } It "Should return the installed font 'CascadiaCodePL'" { $font = Get-Font -Name 'CascadiaCodePL' Write-Verbose ($font | Out-String) -Verbose - $font | Should -Not -BeNullOrEmpty + $font | Should-NotBeNull } } Context 'Function: Uninstall-Font' { It 'Should be available' { - Get-Command -Name 'Uninstall-Font' | Should -Not -BeNull + Get-Command -Name 'Uninstall-Font' | Should-NotBeNull } It 'Should uninstall a font' { - { Uninstall-Font -Name 'CascadiaCodePL' -Verbose } | Should -Not -Throw + Uninstall-Font -Name 'CascadiaCodePL' -Verbose } It 'Should NOT return the uninstalled font' { $font = Get-Font -Name 'CascadiaCodePL' Write-Verbose ($font | Out-String) -Verbose - $font | Should -BeNullOrEmpty + $font | Should-BeNull } It 'Should install and uninstall a font based on wildcard' { $fontPath = Join-Path -Path $PSScriptRoot -ChildPath 'Fonts/CascadiaCodePL.ttf' - { Install-Font -Path $fontPath -Verbose } | Should -Not -Throw + Install-Font -Path $fontPath -Verbose Write-Verbose "Installed font: 'CascadiaCodePL'" -Verbose Write-Verbose (Get-Font | Out-String) -Verbose - { Uninstall-Font -Name 'CascadiaCode*' -Verbose } | Should -Not -Throw + Uninstall-Font -Name 'CascadiaCode*' -Verbose $font = Get-Font -Name 'CascadiaCodePL' Write-Verbose ($font | Out-String) -Verbose - $font | Should -BeNullOrEmpty + $font | Should-BeNull } } }