Skip to content

Merge pull request #359 from TerryHowe/prow-update-master #917

Merge pull request #359 from TerryHowe/prow-update-master

Merge pull request #359 from TerryHowe/prow-update-master #917

Workflow file for this run

name: Windows Tests
on: [push, pull_request]
jobs:
integration_tests:
strategy:
matrix:
go: ['1.22']
platform: [windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: Build
shell: powershell
run: |
go build -v -a -o ./bin/csi-proxy.exe ./cmd/csi-proxy
go build -v -a -o ./bin/csi-proxy-api-gen.exe ./cmd/csi-proxy-api-gen
- name: Run Windows Integration Tests
shell: powershell
run: |
# This scripts reimplements scripts/run-integration.sh in powershell.
# Nested virtualization is required for running Volume and Disk tests
Install-WindowsFeature -name Hyper-V-PowerShell
# copy the binary from the user directory
New-Item -ItemType Directory -Path C:\etc\kubernetes\node\bin -Force
New-Item -ItemType Directory -Path C:\etc\kubernetes\logs -Force
Copy-Item -Path .\bin\csi-proxy.exe -Destination "C:\etc\kubernetes\node\bin\csi-proxy.exe"
# restart the csiproxy service
$flags = "-v=5 -windows-service -log_file=C:\etc\kubernetes\logs\csi-proxy.log -logtostderr=false"
sc.exe create csiproxy start= "auto" binPath= "C:\etc\kubernetes\node\bin\csi-proxy.exe $flags"
sc.exe failure csiproxy reset= 0 actions= restart/10000
sc.exe start csiproxy
Start-Sleep -Seconds 5;
Write-Output "Checking the status of csi-proxy"
sc.exe query csiproxy
[System.IO.Directory]::GetFiles("\\.\\pipe\\")
Write-Output "Get CSI Proxy logs"
Get-Content C:\etc\kubernetes\logs\csi-proxy.log -Tail 20
$env:CSI_PROXY_GH_ACTIONS="TRUE"
go test -timeout 20m -v -race ./integrationtests/...
unit_tests:
strategy:
matrix:
go: ['1.22']
platform: [windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Checkout code
uses: actions/checkout@v4
- name: Run Windows Unit Tests
run: |
make all
go test -v -race ./pkg/...
bump_version_test:
strategy:
matrix:
go: ['1.22']
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Install Tools
run: |
echo "${HOME}/.local/bin" >> $GITHUB_PATH
echo "/home/runner/work/csi-proxy/csi-proxy/go/bin" >> $GITHUB_PATH
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
curl -LO $PB_REL/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip
unzip protoc-3.15.8-linux-x86_64.zip -d $HOME/.local
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/github.com/kubernetes-csi/csi-proxy
- name: Run bump version script
env:
GOPATH: /home/runner/work/csi-proxy/csi-proxy/go
GOBIN: /home/runner/work/csi-proxy/csi-proxy/go/bin
run: |
go install github.com/golang/protobuf/[email protected]
protoc --version
cd /home/runner/work/csi-proxy/csi-proxy/go/src/github.com/kubernetes-csi/csi-proxy
API_GROUP=filesystem OLD_API_VERSION=v1beta2 NEW_API_VERSION=v99 scripts/bump-version.sh