commit
85cc4321d4
|
@ -0,0 +1,26 @@
|
|||
|
||||
#
|
||||
# This codecov.yml is the default configuration for
|
||||
# all repositories on Codecov. You may adjust the settings
|
||||
# below in your own codecov.yml in your repository.
|
||||
#
|
||||
coverage:
|
||||
precision: 2
|
||||
round: down
|
||||
range: 70...100
|
||||
|
||||
status:
|
||||
# Learn more at https://codecov.io/docs#yaml_default_commit_status
|
||||
project:
|
||||
default:
|
||||
threshold: 1% # allow this much decrease on project
|
||||
changes: false
|
||||
|
||||
comment:
|
||||
layout: "header, diff"
|
||||
behavior: default # update if exists else create new
|
||||
|
||||
ignore:
|
||||
- "docs"
|
||||
- "*.md"
|
||||
- "*.rst"
|
8
Makefile
8
Makefile
|
@ -3,6 +3,11 @@ BUILD_FLAGS = -ldflags "-X github.com/cosmos/cosmos-sdk/version.GitCommit=`git r
|
|||
|
||||
all: check_tools get_vendor_deps build test
|
||||
|
||||
########################################
|
||||
### CI
|
||||
|
||||
ci: get_tools get_vendor_deps build test_cover
|
||||
|
||||
########################################
|
||||
### Build
|
||||
|
||||
|
@ -44,6 +49,9 @@ test: test_unit # test_cli
|
|||
test_unit:
|
||||
@go test $(PACKAGES)
|
||||
|
||||
test_cover:
|
||||
@bash test_cover.sh
|
||||
|
||||
test_tutorial:
|
||||
@shelldown ${TUTORIALS}
|
||||
@for script in docs/guide/*.sh ; do \
|
||||
|
|
|
@ -17,5 +17,7 @@ dependencies:
|
|||
|
||||
test:
|
||||
override:
|
||||
- "cd $REPO && make get_tools && make all"
|
||||
- "cd $REPO && make ci"
|
||||
- ls $GOPATH/bin
|
||||
- bash <(curl -s https://codecov.io/bash) -f coverage.txt
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
PKGS=$(go list ./... | grep -v /vendor/)
|
||||
|
||||
set -e
|
||||
echo "mode: atomic" > coverage.txt
|
||||
for pkg in ${PKGS[@]}; do
|
||||
go test -v -timeout 30m -race -coverprofile=profile.out -covermode=atomic "$pkg"
|
||||
if [ -f profile.out ]; then
|
||||
tail -n +2 profile.out >> coverage.txt;
|
||||
rm profile.out
|
||||
fi
|
||||
done
|
Loading…
Reference in New Issue