diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 19bc085..d2637a9 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -59,8 +59,8 @@ jobs: go mod tidy -v git --no-pager diff go.mod go.sum git --no-pager diff --quiet go.mod go.sum - - name: Run tests with race, without goleak - run: go test -race -covermode=atomic -coverpkg=all -coverprofile=coverage.txt -cover -v ./... -test.timeout=10m + - name: Run tests with race + run: go test -v -tags "libsqlite3" -race ./... -test.timeout=10m - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: @@ -100,8 +100,8 @@ jobs: go mod tidy -v git --no-pager diff go.mod go.sum git --no-pager diff --quiet go.mod go.sum - - name: Run tests with race, without goleak - run: go test -race -covermode=atomic -coverpkg=all -coverprofile=coverage.txt -cover -v ./... -test.timeout=10m + - name: Run tests with race + run: go test -v -tags "libsqlite3" -race ./... -test.timeout=10m - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: diff --git a/.golangci.yml b/.golangci.yml index 9f9c29f..a4f9254 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,9 @@ run: deadline: 1m - tests: true + tests: false + skip-files: + - "test/.*" + - "test/.*/.*" linters-settings: golint: @@ -14,16 +17,16 @@ linters-settings: locale: US linters: - disable-all: false + disable-all: true enable: - goconst - misspell - - misspell - - errcheck - unused - staticcheck - unconvert - gofmt - goimports - - revive + # @TODO(gfanton): disable revive for now has it generate to many errors, + # it should be enable in a dedicated PR + # - revive - ineffassign diff --git a/proto.go b/proto.go index 02d6a52..e62f69c 100644 --- a/proto.go +++ b/proto.go @@ -27,7 +27,7 @@ type RendezvousError struct { } func (e RendezvousError) Error() string { - return fmt.Sprintf("Rendezvous error: %s (%s)", e.Text, pb.Message_ResponseStatus(e.Status).String()) + return fmt.Sprintf("Rendezvous error: %s (%s)", e.Text, e.Status.String()) } func NewRegisterMessage(ns string, pi peer.AddrInfo, ttl int) *pb.Message { diff --git a/sync_inmem_provider.go b/sync_inmem_provider.go index 1c82448..88926d4 100644 --- a/sync_inmem_provider.go +++ b/sync_inmem_provider.go @@ -7,11 +7,11 @@ import ( "time" ggio "github.com/gogo/protobuf/io" + pb "github.com/libp2p/go-libp2p-rendezvous/pb" "github.com/libp2p/go-libp2p/core/host" inet "github.com/libp2p/go-libp2p/core/network" "github.com/libp2p/go-libp2p/core/peer" "github.com/libp2p/go-libp2p/core/protocol" - pb "github.com/libp2p/go-libp2p-rendezvous/pb" ) const (