87b625ed50
* tools config * lint * lint * codecov
91 lines
2.2 KiB
YAML
91 lines
2.2 KiB
YAML
version: 2
|
|
jobs:
|
|
build:
|
|
docker:
|
|
- image: circleci/golang:1.13
|
|
|
|
working_directory: /go/src/github.com/cosmos/ethermint
|
|
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- go-mod-v1-{{ checksum "go.sum" }}
|
|
- run:
|
|
name: Verify Dependencies and compile binaries for daemon and cli
|
|
command: make verify build
|
|
- save_cache:
|
|
key: go-mod-v1-{{ checksum "go.sum" }}
|
|
paths:
|
|
- "/go/pkg/mod"
|
|
|
|
lint:
|
|
docker:
|
|
- image: circleci/golang:1.13
|
|
|
|
working_directory: /go/src/github.com/cosmos/ethermint
|
|
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- go-mod-v1-{{ checksum "go.sum" }}
|
|
- run:
|
|
name: Get tools
|
|
command: make tools
|
|
- run:
|
|
name: Run linter
|
|
command: make lint
|
|
- save_cache:
|
|
key: go-mod-v1-{{ checksum "go.sum" }}
|
|
paths:
|
|
- "/go/pkg/mod"
|
|
|
|
test:
|
|
docker:
|
|
- image: circleci/golang:1.13
|
|
|
|
working_directory: /go/src/github.com/cosmos/ethermint
|
|
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- go-mod-v1-{{ checksum "go.sum" }}
|
|
- run:
|
|
name: Run all tests
|
|
command: make test-unit test-import
|
|
- save_cache:
|
|
key: go-mod-v1-{{ checksum "go.sum" }}
|
|
paths:
|
|
- "/go/pkg/mod"
|
|
|
|
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
|
|
|
|
workflows:
|
|
version: 2
|
|
build-workflow:
|
|
jobs:
|
|
- build
|
|
- lint
|
|
- test
|