rosetta-lbry/.circleci/config.yml

104 lines
2.3 KiB
YAML
Raw Normal View History

2020-09-16 21:03:14 +02:00
# 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:
2020-11-13 20:15:21 +01:00
- image: circleci/golang:1.15
2020-09-16 21:03:14 +02:00
user: root # go directory is owned by root
2020-12-08 07:29:15 +01:00
working_directory: /go/src/github.com/lbryio/rosetta-lbry
2020-09-16 21:03:14 +02:00
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
2020-09-16 21:03:14 +02:00
- 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
2020-12-08 07:29:15 +01:00
- run: make coverage
2020-09-16 21:03:14 +02:00
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