build(golang1.15): Upgrade to golang 1.15 for smaller binary (#1303)
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. [1] - `nolintlint_unused.go` testdata is not matching regex. Correct by adding one space after // [1]: https://github.com/golang/go/issues/40763 Signed-off-by: Tam Mach <sayboras@yahoo.com>
This commit is contained in:
parent
6ac41d9f33
commit
18fd36bdd1
7
.github/workflows/pr.yml
vendored
7
.github/workflows/pr.yml
vendored
@ -26,7 +26,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.14 # test only the latest go version to speed up CI
|
||||
go-version: 1.15 # test only the latest go version to speed up CI
|
||||
- name: Run tests
|
||||
run: make.exe test
|
||||
continue-on-error: true
|
||||
@ -38,7 +38,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.14 # test only the latest go version to speed up CI
|
||||
go-version: 1.15 # test only the latest go version to speed up CI
|
||||
- name: Run tests
|
||||
run: make test
|
||||
continue-on-error: true
|
||||
@ -50,6 +50,7 @@ jobs:
|
||||
golang:
|
||||
- 1.13
|
||||
- 1.14
|
||||
- 1.15
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install Go
|
||||
@ -77,6 +78,6 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.14
|
||||
go-version: 1.15
|
||||
- name: Check generated files are up to date
|
||||
run: make fast_check_generated
|
||||
|
2
.github/workflows/tag.yml
vendored
2
.github/workflows/tag.yml
vendored
@ -14,7 +14,7 @@ jobs:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.14
|
||||
go-version: 1.15
|
||||
- name: Unshallow
|
||||
run: git fetch --prune --unshallow
|
||||
- name: Login do docker.io
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM golang:1.14
|
||||
FROM golang:1.15
|
||||
|
||||
# don't place it into $GOPATH/bin because Drone mounts $GOPATH as volume
|
||||
COPY golangci-lint /usr/bin/
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM golang:1.14-alpine
|
||||
FROM golang:1.15-alpine
|
||||
|
||||
# gcc is required to support cgo;
|
||||
# git and mercurial are needed most times for go get`, etc.
|
||||
|
@ -176,7 +176,7 @@ func TestEnabledLinters(t *testing.T) {
|
||||
t.Run(c.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
runArgs := []string{"-v"}
|
||||
runArgs := []string{"--verbose"}
|
||||
if !c.noImplicitFast {
|
||||
runArgs = append(runArgs, "--fast")
|
||||
}
|
||||
|
6
test/testdata/nolintlint_unused.go
vendored
6
test/testdata/nolintlint_unused.go
vendored
@ -5,7 +5,7 @@ package testdata
|
||||
import "fmt"
|
||||
|
||||
func Foo() {
|
||||
fmt.Println("unused") //nolint // ERROR "directive `//nolint .*` is unused"
|
||||
fmt.Println("unused,specific") //nolint:varcheck // ERROR "directive `//nolint:varcheck .*` is unused for linter varcheck"
|
||||
fmt.Println("not run") //nolint:unparam // unparam is not run so this is ok
|
||||
fmt.Println("unused") // nolint // ERROR "directive `//nolint .*` is unused"
|
||||
fmt.Println("unused,specific") // nolint:varcheck // ERROR "directive `//nolint:varcheck .*` is unused for linter varcheck"
|
||||
fmt.Println("not run") // nolint:unparam // unparam is not run so this is ok
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user