Summary
The Test-* jobs in the latest Process-PSModule run fail during Pester discovery, so main CI is red. No tests actually execute (TotalCount = 0); the container fails before discovery completes.
Error
[-] Discovery in .../tests/NerdFonts.Tests.ps1 failed with:
System.IO.FileLoadException: Could not load file or assembly 'Pester, Version=5.7.1.0, Culture=neutral, PublicKeyToken=null'. Assembly with same name is already loaded
at Invoke-BlockContainer, .../Modules/Pester/5.8.0/Pester.psm1: line 3008
Root cause
The test files pin an exact Pester version:
#Requires -Modules @{ ModuleName = 'Pester'; RequiredVersion = '5.7.1' }
The PSModule/Invoke-Pester action now installs and imports the latest Pester (5.8.0) before discovery. When discovery evaluates the #Requires with RequiredVersion = '5.7.1', PowerShell attempts to load the 5.7.1 assembly while 5.8.0 is already loaded in the session, which throws FileLoadException. This is a container/discovery-level failure, so every Test-* job fails.
Affected files
tests/NerdFonts.Tests.ps1
Fix
Remove the exact-version pin line from the affected test file(s):
-#Requires -Modules @{ ModuleName = 'Pester'; RequiredVersion = '5.7.1' }
This matches PSModule/Template-PSModule and the other module repos, whose test files carry no Pester #Requires pin and pass on Pester 5.8.0. The Invoke-Pester action controls the Pester version centrally, so per-repo exact-version pinning is unnecessary and causes this drift whenever Pester releases a new version.
Reference
Failing run: https://github.com/PSModule/NerdFonts/actions/runs/28724812411
Summary
The
Test-*jobs in the latestProcess-PSModulerun fail during Pester discovery, somainCI is red. No tests actually execute (TotalCount = 0); the container fails before discovery completes.Error
Root cause
The test files pin an exact Pester version:
#Requires -Modules @{ ModuleName = 'Pester'; RequiredVersion = '5.7.1' }The
PSModule/Invoke-Pesteraction now installs and imports the latest Pester (5.8.0) before discovery. When discovery evaluates the#RequireswithRequiredVersion = '5.7.1', PowerShell attempts to load the 5.7.1 assembly while 5.8.0 is already loaded in the session, which throwsFileLoadException. This is a container/discovery-level failure, so everyTest-*job fails.Affected files
tests/NerdFonts.Tests.ps1Fix
Remove the exact-version pin line from the affected test file(s):
-#Requires -Modules @{ ModuleName = 'Pester'; RequiredVersion = '5.7.1' }This matches
PSModule/Template-PSModuleand the other module repos, whose test files carry no Pester#Requirespin and pass on Pester 5.8.0. TheInvoke-Pesteraction controls the Pester version centrally, so per-repo exact-version pinning is unnecessary and causes this drift whenever Pester releases a new version.Reference
Failing run: https://github.com/PSModule/NerdFonts/actions/runs/28724812411