Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: upgrade to setup-go v4 and disable cache with golangci #1005

Merged
merged 1 commit into from
Jul 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ defaults:
run:
shell: bash
jobs:

lint:
name: Linters
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -66,9 +65,16 @@ jobs:
uses: actions/checkout@v3

- name: Setup go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
# when the files to be extracted are already present,
# tar extraction in Golangci Lint fails with the "File exists"
# errors. These files appear to be present because of
# cache in setup-go, on disabling the cache we are no more seeing
# such error. Cache is to be enabled once the fix is available for
# this issue.
go-version: ${{ env.GO_VERSION }}
cache: false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a comment here why we skip the cache, or maybe we should skip golangci cache instead, since the issue is in golanci?

Copy link
Contributor Author

@Shwetha-Acharya Shwetha-Acharya Jul 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but I did not find any workarounds with golangci.
I will raise a new issue in the golangci to highlight this scenario.
Also the golangci issue135 has one partial fix which went in 2.4.1 and we are already in golangci-lint-action@v3.

I had tried by updating the' with version' in golangci/golangci-lint-action:
uses: golangci/golangci-lint-action@v3
with:
version: v1.49.0
But did not find much luck with it.

I am not sure what version v1.49.0 is actually representing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


- name: GolangCI Lint
uses: golangci/golangci-lint-action@v3
Expand All @@ -83,7 +89,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 +195,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 +238,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 +352,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