Skip to content

Merge pull request #409 from mauriciopoppe/changelog-library-development #1227

Merge pull request #409 from mauriciopoppe/changelog-library-development

Merge pull request #409 from mauriciopoppe/changelog-library-development #1227

Workflow file for this run

# Run integration and unit tests on a Windows machine
name: Windows Tests
on: [push, pull_request]
jobs:
integration_tests:
strategy:
matrix:
go: ['1.24']
platform: [windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Run Windows Integration Tests
shell: powershell
run: |
# required for running Volume and Disk tests
Install-WindowsFeature -name Hyper-V-PowerShell
$env:CSI_PROXY_GH_ACTIONS="TRUE"
# Note: checkptr is enabled by default with `-race` specified.
# Since Windows COM interop is called in integration tests and
# dereferencing pointer allocated by COM is not safe for Go,
# checkptr needs to be disabled for these tests to pass.
go test --timeout 20m -v -race -gcflags=all=-d=checkptr=0 ./integrationtests/...
unit_tests:
strategy:
matrix:
go: ['1.24']
platform: [windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Checkout code
uses: actions/checkout@v2
- name: Run Windows Unit Tests
run: |
go test -v -race ./pkg/...