mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Default of 10 minute (per package) seem to no longer be enough, so bumping to 20 minutes, as it is on non code coverage runs. Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
24 lines
853 B
Bash
Executable File
24 lines
853 B
Bash
Executable File
#!/bin/bash -e
|
|
# Run from directory above via ./scripts/cov.sh
|
|
|
|
export GO111MODULE="off"
|
|
|
|
go get github.com/mattn/goveralls
|
|
go get github.com/wadey/gocovmerge
|
|
|
|
rm -rf ./cov
|
|
mkdir cov
|
|
go test -v -failfast -covermode=atomic -coverprofile=./cov/conf.out ./conf -timeout=20m
|
|
go test -v -failfast -covermode=atomic -coverprofile=./cov/log.out ./logger -timeout=20m
|
|
go test -v -failfast -covermode=atomic -coverprofile=./cov/server.out ./server -timeout=20m
|
|
go test -v -failfast -covermode=atomic -coverprofile=./cov/test.out -coverpkg=./server ./test -timeout=20m
|
|
gocovmerge ./cov/*.out > acc.out
|
|
rm -rf ./cov
|
|
|
|
# Without argument, launch browser results. We are going to push to coveralls only
|
|
# from Travis.yml and after success of the build (and result of pushing will not affect
|
|
# build result).
|
|
if [[ $1 == "" ]]; then
|
|
go tool cover -html=acc.out
|
|
fi
|