Skip to content

Commit

Permalink
Added cloud build config for merkle (#53)
Browse files Browse the repository at this point in the history
Adds presubmit checks consistent with the other repos.
  • Loading branch information
mhutchinson authored Apr 24, 2023
1 parent 4c1707e commit f1bac7c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 21 deletions.
21 changes: 0 additions & 21 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
26 changes: 26 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -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', './...']

0 comments on commit f1bac7c

Please sign in to comment.