From 0623e9e6e90fea4c9476b79d8e3068722ecb397f Mon Sep 17 00:00:00 2001 From: Pierre Prinetti Date: Mon, 15 Nov 2021 13:16:35 +0100 Subject: [PATCH 1/2] actions: Fix Windows Go version Prior to this patch, the Go version for the Windows tests in Github resolved to `1.15.15`[1]. With this patch, the Go version for the Windows tests is fixed to actually resolve to the latest version (^1.16), consistent to the other platforms. This patch also bumps `actions/setup-go`[2] to the latest version, consistent with the other platforms. [1]: https://github.com/kubernetes-csi/csi-driver-nfs/runs/4211323920?check_suite_focus=true [2]: https://github.com/actions/setup-go --- .github/workflows/windows.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml index 091d317e..6a36be9b 100644 --- a/.github/workflows/windows.yaml +++ b/.github/workflows/windows.yaml @@ -6,14 +6,14 @@ jobs: build: strategy: matrix: - go-versions: [1.16.x] + go: [ '^1.16' ] platform: [windows-latest] runs-on: ${{ matrix.platform }} steps: - name: Install Go - uses: actions/setup-go@v1 + uses: actions/setup-go@v2 with: - go-version: ${{ matrix.go-version }} + go-version: ${{ matrix.go }} - name: Checkout code uses: actions/checkout@v2 - name: Run Windows Unit Tests From 339d4d25aeb66a71ab76109875d97941c0c80fc8 Mon Sep 17 00:00:00 2001 From: Pierre Prinetti Date: Mon, 15 Nov 2021 13:23:34 +0100 Subject: [PATCH 2/2] actions: Print go version In order to rapidly debug test issues, issue `go version` prior to running any test. --- .github/workflows/darwin.yaml | 4 +++- .github/workflows/linux.yaml | 1 + .github/workflows/windows.yaml | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml index 3704c125..4ab87ff7 100644 --- a/.github/workflows/darwin.yaml +++ b/.github/workflows/darwin.yaml @@ -15,4 +15,6 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 - name: Run unit tests - run: go test -v -race ./pkg/... + run: | + go version + go test -v -race ./pkg/... diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 1d5ff59e..8836a641 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -21,6 +21,7 @@ jobs: - name: Build Test run: | + go version export PATH=$PATH:$HOME/.local/bin make verify go test -covermode=count -coverprofile=profile.cov ./pkg/... diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml index 6a36be9b..f24ac764 100644 --- a/.github/workflows/windows.yaml +++ b/.github/workflows/windows.yaml @@ -18,4 +18,5 @@ jobs: uses: actions/checkout@v2 - name: Run Windows Unit Tests run: | + go version go test -v -race ./pkg/...