# Copyright 2020 Coinbase, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. version: 2.1 executors: default: docker: - image: circleci/golang:1.15 user: root # go directory is owned by root working_directory: /go/src/github.com/coinbase/rosetta-bitcoin environment: - GO111MODULE: "on" fast-checkout: &fast-checkout attach_workspace: at: /go jobs: setup: executor: name: default steps: - checkout - run: make deps - persist_to_workspace: root: /go paths: - src - bin - pkg/mod/cache test: executor: name: default steps: - *fast-checkout - run: make test lint: executor: name: default steps: - *fast-checkout - run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.32.2 - run: make lint check-license: executor: name: default steps: - *fast-checkout - run: make check-license check-format: executor: name: default steps: - *fast-checkout - run: make check-format coverage: executor: name: default steps: - *fast-checkout - run: make coverage salus: machine: true steps: - checkout - run: make salus workflows: version: 2 build: jobs: - setup - test: requires: - setup - lint: requires: - setup - check-license: requires: - setup - check-format: requires: - setup - coverage: requires: - setup - salus notify: webhooks: - url: https://coveralls.io/webhook?repo_token=$COVERALLS_TOKEN