66 - main
77 pull_request :
88
9+ env :
10+ GO_VERSION : 1.18
11+
912jobs :
1013 lint :
1114 name : Lint
1215 runs-on : ubuntu-latest
13- env :
14- GO111MODULE : " on"
1516 steps :
16- - name : Set up Go 1.16
17- uses : actions/setup-go@v2
18- with :
19- go-version : 1.16
20- id : go
21-
2217 - name : Checkout code into the Go module directory
23- uses : actions/checkout@v2
18+ uses : actions/checkout@v3
19+
20+ - name : Set up Go
21+ uses : actions/setup-go@v3
22+ with :
23+ go-version : ${{ env.GO_VERSION }}
24+ cache : true
2425
2526 - name : Validate go-mod is up-to-date and license headers
2627 run : make validate
@@ -29,30 +30,23 @@ jobs:
2930 env :
3031 BUILD_TAGS : kube,e2e
3132 run : |
32- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b /usr/bin/ v1.39.0
33+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b /usr/bin/ v1.45.2
3334 make -f builder.Makefile lint
3435
3536 # only on main branch, costs too much for the gain on every PR
3637 validate-cross-build :
3738 name : Validate cross build
3839 runs-on : ubuntu-latest
3940 if : github.ref == 'refs/heads/main'
40- env :
41- GO111MODULE : " on"
4241 steps :
43- - name : Set up Go 1.16
44- uses : actions/setup-go@v2
45- with :
46- go-version : 1.16
47- id : go
48-
4942 - name : Checkout code into the Go module directory
50- uses : actions/checkout@v2
43+ uses : actions/checkout@v3
5144
52- - uses : actions/cache@v2
45+ - name : Set up Go
46+ uses : actions/setup-go@v3
5347 with :
54- path : ~/go/pkg/mod
55- key : go-${{ hashFiles('**/go.sum') }}
48+ go-version : ${{ env.GO_VERSION }}
49+ cache : true
5650
5751 # Ensure we don't discover cross platform build issues at release time.
5852 # Time used to build linux here is gained back in the build for local E2E step
@@ -62,32 +56,25 @@ jobs:
6256 build :
6357 name : Build
6458 runs-on : ubuntu-latest
65- env :
66- GO111MODULE : " on"
6759 steps :
68- - name : Set up Go 1.16
69- uses : actions/setup-go@v2
60+ - name : Checkout code into the Go module directory
61+ uses : actions/checkout@v3
62+
63+ - name : Set up Go
64+ uses : actions/setup-go@v3
7065 with :
71- go-version : 1.16
72- id : go
66+ go-version : ${{ env.GO_VERSION }}
67+ cache : true
7368
7469 - name : Set up gosum
7570 run : |
76- go get -u gotest.tools/gotestsum
71+ go install gotest.tools/gotestsum@latest
7772
7873 - name : Setup docker CLI
7974 run : |
8075 curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.3.tgz | tar xz
8176 sudo cp ./docker/docker /usr/bin/ && rm -rf docker && docker version
8277
83- - name : Checkout code into the Go module directory
84- uses : actions/checkout@v2
85-
86- - uses : actions/cache@v2
87- with :
88- path : ~/go/pkg/mod
89- key : go-${{ hashFiles('**/go.sum') }}
90-
9178 - name : Test
9279 env :
9380 BUILD_TAGS : kube
0 commit comments