Skip to content

Commit

Permalink
Import PS Security module 3.0 before running a PS function
Browse files Browse the repository at this point in the history
  • Loading branch information
mauriciopoppe committed Oct 23, 2024
1 parent 07be14d commit 41d2e4e
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
name: Windows Tests
on: [push, pull_request]
jobs:
setup_powershell:
strategy:
matrix:
go: ['1.22']
platform: [windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Run Windows Integration Tests
run: |
# required for running Volume and Disk tests
Install-WindowsFeature -name Hyper-V-PowerShell
# required for SMB test
Get-PSRepository
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module -Name SecMgmt -AllowClobber
Install-Module Microsoft.PowerShell.Security
Import-Module Microsoft.PowerShell.Security
integration_tests:
strategy:
matrix:
go: ['1.20']
go: ['1.22']
platform: [windows-latest]
runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -22,7 +40,12 @@ jobs:
run: |
# required for running Volume and Disk tests
Install-WindowsFeature -name Hyper-V-PowerShell
# required for SMB test
Get-PSRepository
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module Microsoft.PowerShell.Security
Import-Module Microsoft.PowerShell.Security
# start the CSI Proxy before running tests on windows
Start-Job -Name CSIProxy -ScriptBlock {
.\bin\csi-proxy.exe
Expand All @@ -31,11 +54,12 @@ jobs:
Write-Output "getting named pipes"
[System.IO.Directory]::GetFiles("\\.\\pipe\\")
$env:CSI_PROXY_GH_ACTIONS="TRUE"
go test -timeout 20m -v -race ./integrationtests/...
unit_tests:
strategy:
matrix:
go: ['1.20']
go: ['1.22']
platform: [windows-latest]
runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -53,7 +77,7 @@ jobs:
bump_version_test:
strategy:
matrix:
go: ['1.20']
go: ['1.22']
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
Expand Down

0 comments on commit 41d2e4e

Please sign in to comment.