Skip to content

Commit 5412660

Browse files
tklauseraditighag
authored andcommitted
Update Go to 1.18
Switch to run golangci-lint using `make check` in CI for now, using the golangci-lint GH action with Go 1.18 is not yet fully supported, see golangci/golangci-lint#2649 This approach was suggested by Robin. Signed-off-by: Tobias Klauser <[email protected]>
1 parent 6f3e896 commit 5412660

File tree

8 files changed

+17
-696
lines changed

8 files changed

+17
-696
lines changed

.github/workflows/go.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,17 @@ jobs:
2121
- name: Set up Go
2222
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab
2323
with:
24-
go-version: 1.17.8
24+
go-version: 1.18.0
2525

2626
- name: Run static checks
27-
uses: golangci/golangci-lint-action@b517f99ae23d86ecc4c0dec08dcf48d2336abc29
28-
with:
29-
version: v1.44.2
30-
args: --config=.golangci.yml --verbose
31-
skip-cache: true
27+
run: make check
28+
# TODO: uncomment config below and remove `run: make check` once a
29+
# version of golangci-lint with support for Go 1.18 is released.
30+
# uses: golangci/golangci-lint-action@b517f99ae23d86ecc4c0dec08dcf48d2336abc29
31+
# with:
32+
# version: v1.44.2
33+
# args: --config=.golangci.yml --verbose
34+
# skip-cache: true
3235

3336
- name: Check module vendoring
3437
run: |

.github/workflows/kind.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Set up Go
2828
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab
2929
with:
30-
go-version: 1.17.8
30+
go-version: 1.18.0
3131

3232
- name: Set up Go for root
3333
run: |

.github/workflows/multicluster.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
- name: Set up Go
5555
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab
5656
with:
57-
go-version: 1.17.8
57+
go-version: 1.18.0
5858

5959
- name: Set up job variables
6060
id: vars

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set up Go
1919
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab
2020
with:
21-
go-version: 1.17.8
21+
go-version: 1.18.0
2222

2323
- name: Generate the artifacts
2424
run: make release

.golangci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ linters-settings:
2525
goimports:
2626
local-prefixes: github.com/cilium/cilium-cli
2727
gosimple:
28-
go: "1.17"
28+
go: "1.18"
2929
govet:
3030
enable-all: true
3131
disable:
3232
- fieldalignment
3333
- shadow
3434
staticcheck:
35-
go: "1.17"
35+
go: "1.18"
3636
unused:
37-
go: "1.17"
37+
go: "1.18"
3838

3939
issues:
4040
# This also warns about credential name variables which are false positives.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ release:
2626
--env "RELEASE_GID=$(RELEASE_GID)" \
2727
--rm \
2828
--workdir /cilium \
29-
--volume `pwd`:/cilium docker.io/library/golang:1.17.8-alpine3.15 \
29+
--volume `pwd`:/cilium docker.io/library/golang:1.18.0-alpine3.15 \
3030
sh -c "apk add --no-cache make git && make local-release VERSION=${VERSION}"
3131

3232
local-release: clean

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/cilium/cilium-cli
22

3-
go 1.17
3+
go 1.18
44

55
// Replace directives from github.com/cilium/cilium. Keep in sync when updating Cilium!
66
replace (

go.sum

Lines changed: 0 additions & 682 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)