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/Actions.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/Actions.Tests.ps1
tests/Apps.Tests.ps1
tests/Artifacts.Tests.ps1
tests/Emojis.Tests.ps1
tests/Enterprise.Tests.ps1
tests/Environments.Tests.ps1
tests/GitHub.Tests.ps1
tests/GitHubFormatter.Tests.ps1
tests/Organizations.Tests.ps1
tests/Permissions.Tests.ps1
tests/Releases.Tests.ps1
tests/Repositories.Tests.ps1
tests/Secrets.Tests.ps1
tests/TEMPLATE.ps1
tests/Teams.Tests.ps1
tests/Users.Tests.ps1
tests/Variables.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/GitHub/actions/runs/28725081434
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/Actions.Tests.ps1tests/Apps.Tests.ps1tests/Artifacts.Tests.ps1tests/Emojis.Tests.ps1tests/Enterprise.Tests.ps1tests/Environments.Tests.ps1tests/GitHub.Tests.ps1tests/GitHubFormatter.Tests.ps1tests/Organizations.Tests.ps1tests/Permissions.Tests.ps1tests/Releases.Tests.ps1tests/Repositories.Tests.ps1tests/Secrets.Tests.ps1tests/TEMPLATE.ps1tests/Teams.Tests.ps1tests/Users.Tests.ps1tests/Variables.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/GitHub/actions/runs/28725081434