Skip to content

Commit

Permalink
CI: upgrade to setup-go v4 and disable cache with golangci
Browse files Browse the repository at this point in the history
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:
golangci/golangci-lint-action#135

Updates: RamenDR#1000
Signed-off-by: Shwetha K Acharya <sacharya@redhat.com>
  • Loading branch information
Shwetha-Acharya committed Jul 26, 2023
1 parent 445836a commit 8c2ddce
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/ci.yaml
Expand Up @@ -31,7 +31,6 @@ defaults:
run:
shell: bash
jobs:

lint:
name: Linters
runs-on: ubuntu-20.04
Expand All @@ -58,6 +57,7 @@ jobs:
git --no-pager diff
git diff-index --quiet HEAD
golangci:
name: Golangci Lint
runs-on: ubuntu-20.04
Expand All @@ -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


This comment has been minimized.

Copy link
@nirs

nirs Jul 26, 2023

The whitespace changes are not related, best to do them in a separate commit. If we need to revert the change later, we will revert the unrelated whitespace change.

unit-test:
name: Unit tests
runs-on: ubuntu-20.04
Expand All @@ -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 }}

Expand Down Expand Up @@ -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 }}

Expand Down Expand Up @@ -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 }}

Expand Down Expand Up @@ -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 }}

Expand Down

0 comments on commit 8c2ddce

Please sign in to comment.