mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 06:42:16 +00:00
test: codecov
This commit is contained in:
parent
121714c040
commit
a1649f774e
@ -31,4 +31,6 @@ test:
|
||||
override:
|
||||
- "cd $REPO && make test_integrations"
|
||||
post:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
- "cd $REPO && bash <(curl -s https://codecov.io/bash)"
|
||||
|
||||
|
||||
|
@ -6,8 +6,7 @@ echo `pwd`
|
||||
BRANCH=`git rev-parse --abbrev-ref HEAD`
|
||||
echo "Current branch: $BRANCH"
|
||||
|
||||
# go test --race github.com/tendermint/tendermint/...
|
||||
make test_race
|
||||
bash test/test_cover.sh
|
||||
|
||||
# run the app tests
|
||||
bash test/app/test.sh
|
||||
|
@ -10,7 +10,10 @@ bash ./test/docker/build.sh
|
||||
|
||||
echo ""
|
||||
echo "* running go tests and app tests in docker container"
|
||||
docker run -t tester bash test/run_test.sh
|
||||
docker run --name run_test -t tester bash test/run_test.sh
|
||||
|
||||
# copy the coverage results out of docker container
|
||||
docker cp run_test:/go/src/github.com/tendermint/tendermint/coverage.txt .
|
||||
|
||||
# test basic network connectivity
|
||||
# by starting a local testnet and checking peers connect and make blocks
|
||||
|
13
test/test_cover.sh
Normal file
13
test/test_cover.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#! /bin/bash
|
||||
|
||||
PKGS=$(go list github.com/tendermint/tendermint/... | grep -v /vendor/)
|
||||
|
||||
set -e
|
||||
echo "mode: atomic" > coverage.txt
|
||||
for pkg in ${PKGS[@]}; do
|
||||
go test -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…
x
Reference in New Issue
Block a user