2018-08-01 00:29:33 +00:00
|
|
|
version: 2
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
docker:
|
2019-10-18 23:23:09 +00:00
|
|
|
- image: circleci/golang:1.13
|
2018-08-01 00:29:33 +00:00
|
|
|
|
|
|
|
working_directory: /go/src/github.com/cosmos/ethermint
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout
|
2019-07-02 19:36:22 +00:00
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2019-10-18 23:23:09 +00:00
|
|
|
- go-mod-v1-{{ checksum "go.sum" }}
|
2019-07-02 19:36:22 +00:00
|
|
|
- run:
|
2019-07-11 14:54:28 +00:00
|
|
|
name: Verify Dependencies and compile binaries for daemon and cli
|
|
|
|
command: make verify build
|
|
|
|
- save_cache:
|
2019-10-18 23:23:09 +00:00
|
|
|
key: go-mod-v1-{{ checksum "go.sum" }}
|
2019-07-11 14:54:28 +00:00
|
|
|
paths:
|
|
|
|
- "/go/pkg/mod"
|
|
|
|
|
|
|
|
lint:
|
|
|
|
docker:
|
2019-10-18 23:23:09 +00:00
|
|
|
- image: circleci/golang:1.13
|
2019-07-11 14:54:28 +00:00
|
|
|
|
|
|
|
working_directory: /go/src/github.com/cosmos/ethermint
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2019-10-18 23:23:09 +00:00
|
|
|
- go-mod-v1-{{ checksum "go.sum" }}
|
2019-07-11 14:54:28 +00:00
|
|
|
- run:
|
|
|
|
name: Get tools
|
|
|
|
command: make tools
|
2019-07-02 19:36:22 +00:00
|
|
|
- run:
|
|
|
|
name: Run linter
|
2019-10-18 23:23:09 +00:00
|
|
|
command: make lint
|
2019-07-02 19:36:22 +00:00
|
|
|
- save_cache:
|
2019-10-18 23:23:09 +00:00
|
|
|
key: go-mod-v1-{{ checksum "go.sum" }}
|
2019-07-02 19:36:22 +00:00
|
|
|
paths:
|
|
|
|
- "/go/pkg/mod"
|
|
|
|
|
|
|
|
test:
|
|
|
|
docker:
|
2019-10-18 23:23:09 +00:00
|
|
|
- image: circleci/golang:1.13
|
2018-08-01 00:32:05 +00:00
|
|
|
|
2019-07-02 19:36:22 +00:00
|
|
|
working_directory: /go/src/github.com/cosmos/ethermint
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2019-10-18 23:23:09 +00:00
|
|
|
- go-mod-v1-{{ checksum "go.sum" }}
|
2018-08-01 00:32:05 +00:00
|
|
|
- run:
|
2019-07-02 19:36:22 +00:00
|
|
|
name: Run all tests
|
|
|
|
command: make test-unit test-import
|
|
|
|
- save_cache:
|
2019-10-18 23:23:09 +00:00
|
|
|
key: go-mod-v1-{{ checksum "go.sum" }}
|
2019-07-02 19:36:22 +00:00
|
|
|
paths:
|
|
|
|
- "/go/pkg/mod"
|
2020-03-16 22:53:24 +00:00
|
|
|
|
|
|
|
upload-coverage:
|
|
|
|
docker: # run the steps with Docker
|
|
|
|
# CircleCI Go images available at: https://hub.docker.com/r/circleci/golang/
|
|
|
|
- image: circleci/golang:1.13 #
|
|
|
|
working_directory: /go/src/github.com/cosmos/ethermint
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: gather
|
|
|
|
command: |
|
|
|
|
for d in $(go list ./... | grep -v vendor); do
|
|
|
|
go test -race -coverprofile=profile.out -covermode=atomic "$d"
|
|
|
|
if [ -f profile.out ]; then
|
|
|
|
cat profile.out >> coverage.txt
|
|
|
|
rm profile.out
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
- run:
|
|
|
|
name: upload
|
|
|
|
command: bash <(curl -s https://codecov.io/bash) -f coverage.txt
|
2019-07-02 19:36:22 +00:00
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
build-workflow:
|
|
|
|
jobs:
|
|
|
|
- build
|
2019-07-11 14:54:28 +00:00
|
|
|
- lint
|
2019-07-02 19:36:22 +00:00
|
|
|
- test
|