From 8c2ddceefbae1ae6378fbaf970c6219296526641 Mon Sep 17 00:00:00 2001 From: Shwetha K Acharya Date: Tue, 25 Jul 2023 16:13:28 +0530 Subject: [PATCH] CI: upgrade to setup-go v4 and disable cache with golangci Below errors were seen with setup-go@v4 in golangci Lint: Error: /usr/bin/tar: ../../../go/pkg/mod/sigs.k8s.io/yaml@v1.3.0/yaml_ test.go: Cannot open: File exists /usr/bin/tar: ../../../go/pkg/mod/sigs.k8s.io/yaml@v1.3.0/LICENSE: Cannot open: File exists Disabling Cache with golangci solves the problem and makes sure that we are in a reecent setup-go as well. Cache can be enabled once the resultant issue is fixed in golangci lint action repo. Issue that is to be tracked: https://github.com/golangci/golangci-lint-action/issues/135 Updates: #1000 Signed-off-by: Shwetha K Acharya --- .github/workflows/ci.yaml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cdae8b328..32a90ff3b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -31,7 +31,6 @@ defaults: run: shell: bash jobs: - lint: name: Linters runs-on: ubuntu-20.04 @@ -58,6 +57,7 @@ jobs: git --no-pager diff git diff-index --quiet HEAD + golangci: name: Golangci Lint runs-on: ubuntu-20.04 @@ -66,15 +66,17 @@ jobs: uses: actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} + cache: false - name: GolangCI Lint uses: golangci/golangci-lint-action@v3 with: version: v1.49.0 + unit-test: name: Unit tests runs-on: ubuntu-20.04 @@ -83,7 +85,7 @@ jobs: uses: actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} @@ -189,7 +191,7 @@ jobs: uses: actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} @@ -232,7 +234,7 @@ jobs: uses: actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} @@ -346,7 +348,7 @@ jobs: uses: actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }}