Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ jobs:
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
# The hosted runner image no longer ships with PSGallery
# pre-registered, so Set-PSRepository fails outright with
# "No repository with the name 'PSGallery' was found".
# Register the defaults first when it is absent.
if (-not (Get-PSRepository -Name PSGallery -ErrorAction SilentlyContinue)) {
Register-PSRepository -Default
}
Set-PSRepository PSGallery -InstallationPolicy Trusted

$installed = Get-Module -ListAvailable -Name PSScriptAnalyzer |
Expand Down Expand Up @@ -205,6 +212,13 @@ jobs:
- name: Install Pester
shell: pwsh
run: |
# The hosted runner image no longer ships with PSGallery
# pre-registered, so Set-PSRepository fails outright with
# "No repository with the name 'PSGallery' was found".
# Register the defaults first when it is absent.
if (-not (Get-PSRepository -Name PSGallery -ErrorAction SilentlyContinue)) {
Register-PSRepository -Default
}
Set-PSRepository PSGallery -InstallationPolicy Trusted

$installed = Get-Module -ListAvailable -Name Pester |
Expand Down Expand Up @@ -305,6 +319,13 @@ jobs:
- name: Install Pester
shell: pwsh
run: |
# The hosted runner image no longer ships with PSGallery
# pre-registered, so Set-PSRepository fails outright with
# "No repository with the name 'PSGallery' was found".
# Register the defaults first when it is absent.
if (-not (Get-PSRepository -Name PSGallery -ErrorAction SilentlyContinue)) {
Register-PSRepository -Default
}
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module -Name Pester -MinimumVersion $env:PESTER_VERSION -Force -Scope CurrentUser
Import-Module Pester -PassThru
Expand Down
Loading