mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Merge pull request #36 from apcera/add-coveralls
Add a small script to run the tests and report to coveralls in travis.
This commit is contained in:
31
.travis.yml
31
.travis.yml
@@ -1,20 +1,23 @@
|
||||
language: go
|
||||
go:
|
||||
- 1.3
|
||||
|
||||
- 1.3
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
- master
|
||||
install:
|
||||
- DST=~/gopath/src/github.com/apcera
|
||||
- mkdir -p "$DST"
|
||||
- git clone --depth=1 --quiet https://github.com/apcera/nats.git "$DST"/nats
|
||||
- go get code.google.com/p/go.tools/cmd/vet
|
||||
|
||||
- DST=~/gopath/src/github.com/apcera
|
||||
- mkdir -p "$DST"
|
||||
- git clone --depth=1 --quiet https://github.com/apcera/nats.git "$DST"/nats
|
||||
- go get code.google.com/p/go.tools/cmd/vet
|
||||
- go get code.google.com/p/go.tools/cmd/cover
|
||||
- go get github.com/mattn/goveralls
|
||||
script:
|
||||
- go build
|
||||
- go fmt ./...
|
||||
- go vet ./...
|
||||
- go test -i -race ./...
|
||||
- go test -v -race ./...
|
||||
- go build
|
||||
- go fmt ./...
|
||||
- go vet ./...
|
||||
- go test -i -race ./...
|
||||
- go test -v -race ./...
|
||||
- ./travis/coveralls-script.sh
|
||||
env:
|
||||
global:
|
||||
secure: fi/zxSp5eF6Mt8yrgJakBVinDpCDFy3zPZ4Jy7jsyoKWgF7CdSFmh0WBcN932KOLCRaVm7ZqD2RwO9SifIsBcDtZqML4RKg3Q+T+Uqt4LpskVobMYkPKDcA5i3c3ifhJu/wzl7Y/jnysvjxCwQrH/nGAc4+AwyH6x2TjKF7UFoY=
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Gnatsd [](http://travis-ci.org/apcera/gnatsd)
|
||||
# Gnatsd [](http://travis-ci.org/apcera/gnatsd) [](https://coveralls.io/r/apcera/gnatsd)
|
||||
|
||||
A High Performance [NATS](https://github.com/derekcollison/nats) Server written in [Go.](http://golang.org)
|
||||
|
||||
|
||||
16
travis/coveralls-script.sh
Executable file
16
travis/coveralls-script.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash -e
|
||||
echo "mode: count" > acc.out
|
||||
for Dir in $(find ./* -maxdepth 10 -type d | grep -v test);
|
||||
do
|
||||
if ls $Dir/*.go &> /dev/null;
|
||||
then
|
||||
go test -v -covermode=count -coverprofile=profile.out $Dir
|
||||
if [ -f profile.out ]
|
||||
then
|
||||
cat profile.out | grep -v "mode: count" >> acc.out
|
||||
fi
|
||||
fi
|
||||
done
|
||||
$HOME/gopath/bin/goveralls -coverprofile=acc.out $COVERALLS
|
||||
rm -rf ./profile.out
|
||||
rm -rf ./acc.out
|
||||
Reference in New Issue
Block a user