diff --git a/.golangci.yaml b/.golangci.yaml index be4f413..0675e1e 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -3,30 +3,9 @@ run: deadline: 90s linters-settings: - gocyclo: - # minimal code complexity to report, 30 by default (but we recommend 10-20) - min-complexity: 25 depguard: list-type: blacklist packages: - golang.org/x/net/context - github.com/gogo/protobuf/proto -linters: - disable-all: true - enable: - - deadcode - - depguard - - gocyclo - - gofmt - - goimports - - govet - - ineffassign - - megacheck - - misspell - - revive - - varcheck - -issues: - # Don't turn off any checks by default. We can do this explicitly if needed. - exclude-use-default: false diff --git a/cloudbuild.yaml b/cloudbuild.yaml new file mode 100644 index 0000000..eafbc79 --- /dev/null +++ b/cloudbuild.yaml @@ -0,0 +1,26 @@ +timeout: 300s +options: + machineType: E2_HIGHCPU_32 + volumes: + - name: go-modules + path: /go + env: + - GOPROXY=https://proxy.golang.org + - PROJECT_ROOT=github.com/transparency-dev/merkle + - GOPATH=/go + +# Cloud Build logs sent to GCS bucket +logsBucket: 'gs://trillian-cloudbuild-logs' + +steps: +- id: 'lint' + name: "golangci/golangci-lint:v1.51" + args: ["golangci-lint", "run", "--timeout", "10m"] + +- id: 'unit tests' + name: 'golang:1.19' + args: ['go', 'test', './...'] + +- id: 'build' + name: 'golang:1.19' + args: ['go', 'build', './...']