From 20e0b136f187b76fa08c4f62f38c26c6ce306cfd Mon Sep 17 00:00:00 2001 From: Derek Collison Date: Wed, 24 Jun 2015 16:55:25 -0400 Subject: [PATCH] Updates for Travis --- .../TRAVIS_PRIVATE_REPO_INSTRUCTIONS.txt | 22 ------------------ .travis-support/id_travis.pub.pem | 6 ----- .travis-support/token | Bin 128 -> 0 bytes .travis.yml | 14 +++++++---- README.md | 3 ++- heartbeat_test.go | 2 +- 6 files changed, 12 insertions(+), 35 deletions(-) delete mode 100644 .travis-support/TRAVIS_PRIVATE_REPO_INSTRUCTIONS.txt delete mode 100644 .travis-support/id_travis.pub.pem delete mode 100644 .travis-support/token diff --git a/.travis-support/TRAVIS_PRIVATE_REPO_INSTRUCTIONS.txt b/.travis-support/TRAVIS_PRIVATE_REPO_INSTRUCTIONS.txt deleted file mode 100644 index bc8a161..0000000 --- a/.travis-support/TRAVIS_PRIVATE_REPO_INSTRUCTIONS.txt +++ /dev/null @@ -1,22 +0,0 @@ -# Create a directory for holding the keys and token. I called it travis-support. - -TOKEN=$( - curl -i -u "derekcollison" https://api.github.com/authorizations \ - -d '{"scopes":["repo"]}' | - egrep " +\"token\": \"[0-9a-f]+\"," | - awk '{print $2}' | - awk -F'"' '{print $2}' - ) - -curl -u derekcollison https://api.github.com/repos/apcera/graft/keys | - grep -B 4 travis-ci\\.com | - grep '"key":' | - perl -pe 's/^[ ]+"key": //; s/^"//; s/",$//' > id_travis.pub - -# DO NOT PLACE id_travis.pub into the repo. - -ssh-keygen -e -m PKCS8 -f id_travis.pub > id_travis.pub.pem - -echo "$TOKEN" | openssl rsautl -encrypt -pubin -inkey id_travis.pub.pem -out token - - diff --git a/.travis-support/id_travis.pub.pem b/.travis-support/id_travis.pub.pem deleted file mode 100644 index 5db0bd7..0000000 --- a/.travis-support/id_travis.pub.pem +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCa+pTkNwIUCgQQLwPnkqx+19cf -7+XNkJCuIR3RLPBjKDb7fZPAt2f/8P5XGuhrH3NRytO2pPJQGdgGHDKzut3wDvt9 -trJ7ctzCey0WMWxrw1DJHw2yb+mQM0+U8/bNNHluVl8CqQodT9Cl+CLSzSGvtma0 -zZfMB2rQtG9ZQfQrFQIDAQAB ------END PUBLIC KEY----- diff --git a/.travis-support/token b/.travis-support/token deleted file mode 100644 index 50dd2e859c9e20e006d002f49ad2a611c29daddf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 128 zcmV-`0Du1xve1p7qk;}_8`%KBf`7`iJ@Iz$)&Qb**To<&-}XPtzHj9N<8Ni-jX<9& zj8Tm`HunFq&eO>cMIzc>{mljXhsoGKtcp>}{k44*5|3%WiztlY96!hrAo%^>_*VxG iRntOa^WEv8K9*#+vtW|U`BbR#&xzg7{6>=SyPwjFZAe)F diff --git a/.travis.yml b/.travis.yml index 5deda9b..877e0bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,14 @@ language: go go: -- 1.3 +- 1.4 install: -- DST=~/gopath/src/github.com/apcera +- DST=~/gopath/src/github.com/nats-io - mkdir -p "$DST" -- git clone --depth=1 --quiet https://github.com/apcera/gnatsd.git "$DST"/gnatsd -- go get code.google.com/p/go.tools/cmd/vet +- git clone --depth=1 --quiet https://github.com/nats-io/gnatsd.git "$DST"/gnatsd +- go get golang.org/x/tools/cmd/vet +- go get golang.org/x/tools/cmd/cover +- go get github.com/mattn/goveralls script: - go get -d -v ./... @@ -14,4 +16,6 @@ script: - go fmt ./... - go vet ./... - go test -i -race ./... - - go test -v -race ./... + - GOMAXPROCS=1 go test -v -race ./... + - GOMAXPROCS=1 go test -v -covermode=count -coverprofile=coverage.out + - $HOME/gopath/bin/goveralls -coverprofile coverage.out -service travis-ci diff --git a/README.md b/README.md index f96dbf8..740c8f7 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ A RAFT Election implementation in Go. More information on RAFT can be found in t ) and this [video](http://www.youtube.com/watch?v=YbZ3zDzDnrw&list=WL20FE97C942825E1E). [![License MIT](https://img.shields.io/npm/l/express.svg)](http://opensource.org/licenses/MIT) -[![Build Status](https://magnum.travis-ci.com/apcera/graft.png?token=UGjrGa8sFWGQcHSJeAvp)](https://magnum.travis-ci.com/apcera/graft) +[![Build Status](https://travis-ci.org/nats-io/graft.svg?branch=master)](http://travis-ci.org/nats-io/graft) +[![Coverage Status](https://coveralls.io/repos/nats-io/graft/badge.svg)](https://coveralls.io/r/nats-io/graft?branch=master) Overview ===== diff --git a/heartbeat_test.go b/heartbeat_test.go index b36ba94..644e46e 100644 --- a/heartbeat_test.go +++ b/heartbeat_test.go @@ -28,7 +28,7 @@ func sendAndWait(n *Node, hb *Heartbeat) { for len(n.HeartBeats) > 0 { time.Sleep(1 * time.Millisecond) } - time.Sleep(1 * time.Millisecond) + time.Sleep(5 * time.Millisecond) } func TestHeartBeatAsFollower(t *testing.T) {