Skip to content

Commit

Permalink
Update Go to 1.18
Browse files Browse the repository at this point in the history
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 <tobias@cilium.io>
  • Loading branch information
tklauser authored and michi-covalent committed Mar 17, 2022
1 parent 6eacb95 commit 4ab6135
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 696 deletions.
15 changes: 9 additions & 6 deletions cli/.github/workflows/go.yaml
Expand Up @@ -21,14 +21,17 @@ jobs:
- name: Set up Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab
with:
go-version: 1.17.8
go-version: 1.18.0

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

- name: Check module vendoring
run: |
Expand Down
2 changes: 1 addition & 1 deletion cli/.github/workflows/kind.yaml
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab
with:
go-version: 1.17.8
go-version: 1.18.0

- name: Set up Go for root
run: |
Expand Down
2 changes: 1 addition & 1 deletion cli/.github/workflows/multicluster.yaml
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab
with:
go-version: 1.17.8
go-version: 1.18.0

- name: Set up job variables
id: vars
Expand Down
2 changes: 1 addition & 1 deletion cli/.github/workflows/release.yaml
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab
with:
go-version: 1.17.8
go-version: 1.18.0

- name: Generate the artifacts
run: make release
Expand Down
6 changes: 3 additions & 3 deletions cli/.golangci.yml
Expand Up @@ -25,16 +25,16 @@ linters-settings:
goimports:
local-prefixes: github.com/cilium/cilium-cli
gosimple:
go: "1.17"
go: "1.18"
govet:
enable-all: true
disable:
- fieldalignment
- shadow
staticcheck:
go: "1.17"
go: "1.18"
unused:
go: "1.17"
go: "1.18"

issues:
# This also warns about credential name variables which are false positives.
Expand Down
2 changes: 1 addition & 1 deletion cli/Makefile
Expand Up @@ -26,7 +26,7 @@ release:
--env "RELEASE_GID=$(RELEASE_GID)" \
--rm \
--workdir /cilium \
--volume `pwd`:/cilium docker.io/library/golang:1.17.8-alpine3.15 \
--volume `pwd`:/cilium docker.io/library/golang:1.18.0-alpine3.15 \
sh -c "apk add --no-cache make git && make local-release VERSION=${VERSION}"

local-release: clean
Expand Down
2 changes: 1 addition & 1 deletion cli/go.mod
@@ -1,6 +1,6 @@
module github.com/cilium/cilium-cli

go 1.17
go 1.18

// Replace directives from github.com/cilium/cilium. Keep in sync when updating Cilium!
replace (
Expand Down
682 changes: 0 additions & 682 deletions cli/go.sum

Large diffs are not rendered by default.

0 comments on commit 4ab6135

Please sign in to comment.