Unverified Commit b0b12516 authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #3 from libp2p/kevina/travisci

Update Travis CI to use standard test script and go 1.9.x.
parents 22f3bbcb 9bd9dbe4
...@@ -2,19 +2,18 @@ os: ...@@ -2,19 +2,18 @@ os:
- linux - linux
- osx - osx
sudo: flase
language: go language: go
go: go:
- 1.7 - 1.9.x
install: true
before_install: install:
- make deps - make deps
script: script:
- go vet - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh)
- $GOPATH/bin/goveralls -service="travis-ci"
cache: cache:
directories: directories:
......
...@@ -2,11 +2,7 @@ gx: ...@@ -2,11 +2,7 @@ gx:
go get github.com/whyrusleeping/gx go get github.com/whyrusleeping/gx
go get github.com/whyrusleeping/gx-go go get github.com/whyrusleeping/gx-go
covertools: deps: gx
go get github.com/mattn/goveralls
go get golang.org/x/tools/cmd/cover
deps: gx covertools
gx --verbose install --global gx --verbose install --global
gx-go rewrite gx-go rewrite
......
coverage:
range: "50...100"
comment: off
...@@ -122,7 +122,7 @@ func (nat *NAT) NewMapping(maddr ma.Multiaddr) (Mapping, error) { ...@@ -122,7 +122,7 @@ func (nat *NAT) NewMapping(maddr ma.Multiaddr) (Mapping, error) {
network, addr, err := manet.DialArgs(maddr) network, addr, err := manet.DialArgs(maddr)
if err != nil { if err != nil {
return nil, fmt.Errorf("DialArgs failed on addr:", maddr.String()) return nil, fmt.Errorf("DialArgs failed on addr: %s", maddr.String())
} }
switch network { switch network {
...@@ -235,10 +235,10 @@ func (nat *NAT) PortMapAddrs(addrs []ma.Multiaddr) { ...@@ -235,10 +235,10 @@ func (nat *NAT) PortMapAddrs(addrs []ma.Multiaddr) {
for _, addr := range addrs { for _, addr := range addrs {
// do all of them concurrently // do all of them concurrently
wg.Add(1) wg.Add(1)
go func() { go func(addr ma.Multiaddr) {
defer wg.Done() defer wg.Done()
nat.NewMapping(addr) nat.NewMapping(addr)
}() }(addr)
} }
wg.Wait() wg.Wait()
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment