diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 6618288ce..3b0694d96 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -13,10 +13,10 @@ name: "CodeQL" on: push: - branches: [ master, 'release-**' ] + branches: [ "main", "development" ] pull_request: # The branches below must be a subset of the branches above - branches: [ master, 'release-**' ] + branches: [ "main", "development" ] schedule: - cron: '0 */24 * * *' diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 7f0c57f17..320e10147 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -2,8 +2,8 @@ name: Linux Tests # Controls when the workflow will run on: - pull_request: {} - push: {} + pull_request: {} + push: {} # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -38,9 +38,10 @@ jobs: export PATH=$PATH:$HOME/.local/bin make container + - name: Install goveralls + run: go install github.com/mattn/goveralls@latest + - name: Get code coverage env: COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - GO111MODULE=off go get github.com/mattn/goveralls - $(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github + run: goveralls -coverprofile=profile.cov -service=github diff --git a/go.sum b/go.sum index b38a28f51..b0950c620 100644 --- a/go.sum +++ b/go.sum @@ -1209,6 +1209,7 @@ golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= diff --git a/hack/verify-golint.sh b/hack/verify-golint.sh index 0dd810f21..bf8c14dbd 100755 --- a/hack/verify-golint.sh +++ b/hack/verify-golint.sh @@ -18,13 +18,13 @@ set -euo pipefail if [[ -z "$(command -v golangci-lint)" ]]; then echo "Cannot find golangci-lint. Installing golangci-lint..." - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.0 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.60.3 export PATH=$PATH:$(go env GOPATH)/bin fi echo "Verifying golint" # The deprecated 'golint' linter has been replaced with 'revive' -golangci-lint run --no-config --enable=revive --deadline=10m +golangci-lint run --no-config --enable=revive --timeout=10m echo "Congratulations! Lint check completed for all Go source files." diff --git a/pkg/csi-common/utils_test.go b/pkg/csi-common/utils_test.go index 1bc7a68c1..ac629ad0e 100644 --- a/pkg/csi-common/utils_test.go +++ b/pkg/csi-common/utils_test.go @@ -98,7 +98,7 @@ func TestLogGRPC(t *testing.T) { buf := new(bytes.Buffer) klog.SetOutput(buf) - handler := func(ctx context.Context, req interface{}) (interface{}, error) { return nil, nil } + handler := func(_ context.Context, _ interface{}) (interface{}, error) { return nil, nil } info := grpc.UnaryServerInfo{ FullMethod: "fake", }