-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JAV-14 Updated Coverage Configuration
- Loading branch information
1 parent
61e3690
commit 4ef0b20
Showing
6 changed files
with
61 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,39 @@ | ||
language: go | ||
sudo: false | ||
|
||
sudo: required | ||
|
||
services: | ||
- docker | ||
|
||
go: | ||
- 1.7.3 | ||
|
||
before_install: | ||
- docker run -d -v /usr/share/ca-certificates/:/etc/ssl/certs -p 40010:40010 -p 23800:23800 -p 23790:23790 --name etcd quay.io/coreos/etcd etcd -name etcd0 -advertise-client-urls http://127.0.0.1:23790,http://127.0.0.1:40010 -listen-client-urls http://0.0.0.0:23790,http://0.0.0.0:40010 -initial-advertise-peer-urls http://127.0.0.1:23800 -listen-peer-urls http://0.0.0.0:23800 -initial-cluster-token etcd-cluster-1 -initial-cluster etcd0=http://127.0.0.1:23800 -initial-cluster-state new | ||
- go get github.com/mattn/goveralls | ||
- go get golang.org/x/tools/cmd/cover | ||
- go get github.com/tedsuo/rata | ||
- go get github.com/onsi/ginkgo/config | ||
- go get github.com/onsi/ginkgo/types | ||
- go get github.com/onsi/ginkgo | ||
- go get github.com/onsi/gomega/gbytes | ||
- go get github.com/onsi/gomega | ||
- go get github.com/onsi/ginkgo/ginkgo | ||
|
||
install: true | ||
|
||
script: | ||
- bash +x scripts/build.sh | ||
- mkdir -p $HOME/gopath/src/github.com/servicecomb/service-center | ||
- rsync -az ${TRAVIS_BUILD_DIR}/ $HOME/gopath/src/github.com/servicecomb/service-center/ | ||
- export TRAVIS_BUILD_DIR=$HOME/gopath/src/github.com/servicecomb/service-center | ||
- cd $HOME/gopath/src/github.com/servicecomb/service-center | ||
- CGO_ENABLED=0 GO_EXTLINK_ENABLED=0 go build --ldflags '-w -extldflags "-static"' -o servicecenter | ||
- bash +x scripts/prepare_env_ut.sh | ||
- bash -x scripts/ut.sh common | ||
- bash -x scripts/ut.sh etcdsync | ||
- bash -x scripts/ut.sh server/interceptor | ||
- $HOME/gopath/bin/goveralls -coverprofile=coverage.txt -service=travis-ci | ||
|
||
|
||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
cp -r etc/conf common/cron/ | ||
cp -r etc/conf common/ | ||
cp -r etc/conf etcdsync/ | ||
cp -r etc/conf server/interceptor/ratelimiter/ | ||
echo "mode: atomic" > coverage.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
set -e | ||
export COVERAGE_PATH=$(pwd) | ||
cd $1 | ||
for d in $(go list ./... | grep -v vendor); do | ||
cd $HOME/gopath/src/ | ||
cd $d | ||
set +e | ||
ginkgo -r -v -cover | ||
if [ -f *.coverprofile ]; then | ||
sed '1d;$d' *.coverprofile >> $HOME/gopath/src/github.com/servicecomb/service-center/coverage.txt | ||
fi | ||
set -e | ||
done |