Skip to content

Commit 12adeca

Browse files
committed
build(golang1.15): Upgrade to golang 1.15 for smaller binary
Golang 1.15 comes to few improvements, one of them is to have smaller binary. This PR is to make golang 1.15 as default version in CI, I also update Docker based image to golang:1.15* as well. Two issues faced with golang 1.15: - Conflict between -v in `golangci-lint` and `go test`. Update to --verbose to avoid the same. - `nolintlint_unused.go` testdata is not matching regex. Correct by adding one space after // [1]: golang/go#40763 Signed-off-by: Tam Mach <sayboras@yahoo.com>
1 parent 6ac41d9 commit 12adeca

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
lines changed

.github/workflows/pr.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Install Go
2727
uses: actions/setup-go@v2
2828
with:
29-
go-version: 1.14 # test only the latest go version to speed up CI
29+
go-version: 1.15 # test only the latest go version to speed up CI
3030
- name: Run tests
3131
run: make.exe test
3232
continue-on-error: true
@@ -38,7 +38,7 @@ jobs:
3838
- name: Install Go
3939
uses: actions/setup-go@v2
4040
with:
41-
go-version: 1.14 # test only the latest go version to speed up CI
41+
go-version: 1.15 # test only the latest go version to speed up CI
4242
- name: Run tests
4343
run: make test
4444
continue-on-error: true
@@ -50,6 +50,7 @@ jobs:
5050
golang:
5151
- 1.13
5252
- 1.14
53+
- 1.15
5354
steps:
5455
- uses: actions/checkout@v2
5556
- name: Install Go
@@ -77,6 +78,6 @@ jobs:
7778
- name: Install Go
7879
uses: actions/setup-go@v2
7980
with:
80-
go-version: 1.14
81+
go-version: 1.15
8182
- name: Check generated files are up to date
8283
run: make fast_check_generated

.github/workflows/tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Install Go
1515
uses: actions/setup-go@v2
1616
with:
17-
go-version: 1.14
17+
go-version: 1.15
1818
- name: Unshallow
1919
run: git fetch --prune --unshallow
2020
- name: Login do docker.io

build/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.14
1+
FROM golang:1.15
22

33
# don't place it into $GOPATH/bin because Drone mounts $GOPATH as volume
44
COPY golangci-lint /usr/bin/

build/Dockerfile.alpine

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.14-alpine
1+
FROM golang:1.15-alpine
22

33
# gcc is required to support cgo;
44
# git and mercurial are needed most times for go get`, etc.

test/enabled_linters_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ func TestEnabledLinters(t *testing.T) {
176176
t.Run(c.name, func(t *testing.T) {
177177
t.Parallel()
178178

179-
runArgs := []string{"-v"}
179+
runArgs := []string{"--verbose"}
180180
if !c.noImplicitFast {
181181
runArgs = append(runArgs, "--fast")
182182
}

test/testdata/nolintlint_unused.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package testdata
55
import "fmt"
66

77
func Foo() {
8-
fmt.Println("unused") //nolint // ERROR "directive `//nolint .*` is unused"
9-
fmt.Println("unused,specific") //nolint:varcheck // ERROR "directive `//nolint:varcheck .*` is unused for linter varcheck"
10-
fmt.Println("not run") //nolint:unparam // unparam is not run so this is ok
8+
fmt.Println("unused") // nolint // ERROR "directive `//nolint .*` is unused"
9+
fmt.Println("unused,specific") // nolint:varcheck // ERROR "directive `//nolint:varcheck .*` is unused for linter varcheck"
10+
fmt.Println("not run") // nolint:unparam // unparam is not run so this is ok
1111
}

0 commit comments

Comments
 (0)