Unverified Commit 4f594431 authored by Adin Schmahmann's avatar Adin Schmahmann Committed by GitHub

Merge pull request #2 from libp2p/fix/ci

Fix CI
parents d8d34a75 fa105548
os:
- linux
language: go language: go
go: go:
- 1.11.x - 1.14.x
- 1.12.x - 1.15.x
- 1.13.x
- tip env:
before_install: global:
- travis_retry go get github.com/mattn/goveralls - GOTFLAGS="-race"
matrix:
- BUILD_DEPTYPE=gomod
# disable travis install
install:
- true
script: script:
- go test -v -covermode=count -coverprofile=coverage.out ./... - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh)
- travis_retry $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci
cache:
directories:
- $GOPATH/pkg/mod
- $HOME/.cache/go-build
notifications:
email: false
...@@ -8,8 +8,8 @@ import ( ...@@ -8,8 +8,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/stretchr/testify/assert"
rnet "github.com/libp2p/go-cidranger/net" rnet "github.com/libp2p/go-cidranger/net"
"github.com/stretchr/testify/assert"
) )
/* /*
......
...@@ -2,14 +2,15 @@ package cidranger ...@@ -2,14 +2,15 @@ package cidranger
import ( import (
"encoding/binary" "encoding/binary"
detectrace "github.com/ipfs/go-detect-race"
"math/rand" "math/rand"
"net" "net"
"runtime" "runtime"
"testing" "testing"
"time" "time"
"github.com/stretchr/testify/assert"
rnet "github.com/libp2p/go-cidranger/net" rnet "github.com/libp2p/go-cidranger/net"
"github.com/stretchr/testify/assert"
) )
func getAllByVersion(version rnet.IPVersion) *net.IPNet { func getAllByVersion(version rnet.IPVersion) *net.IPNet {
...@@ -486,6 +487,11 @@ func TestTrieMemUsage(t *testing.T) { ...@@ -486,6 +487,11 @@ func TestTrieMemUsage(t *testing.T) {
if testing.Short() { if testing.Short() {
t.Skip("Skipping memory test in `-short` mode") t.Skip("Skipping memory test in `-short` mode")
} }
if detectrace.WithRace() {
t.Skip("Skipping memory test in `-race` mode")
}
numIPs := 100000 numIPs := 100000
runs := 10 runs := 10
......
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