浏览代码

Fix Travis

Signed-off-by: Vadim Markovtsev <vadim@sourced.tech>
Vadim Markovtsev 7 年之前
父节点
当前提交
96008dc382
共有 5 个文件被更改,包括 9 次插入3 次删除
  1. 3 1
      .travis.yml
  2. 4 0
      internal/plumbing/uast/test/utils.go
  3. 1 1
      leaves/burndown.go
  4. 1 1
      leaves/couples.go
  5. 0 0
      yaml/utils.go

+ 3 - 1
.travis.yml

@@ -58,7 +58,9 @@ script:
   - set -e
   - go vet -tags tensorflow ./...
   - golint -set_exit_status ./...
-  - goverage -tags tensorflow -v -cpu=1,2 -coverprofile=coverage.txt -covermode=count gopkg.in/src-d/hercules.v4/...
+  - printf '#!/bin/sh\nshift\ngo test -tags tensorflow $@\n' > gotag
+  - chmod +x gotag
+  - goverage -go-binary=$(pwd)/gotag -v -cpu=1,2 -coverprofile=coverage.txt -covermode=count gopkg.in/src-d/hercules.v4/...
   - $GOPATH/bin/hercules version
   - $GOPATH/bin/hercules --burndown --couples --quiet --pb https://github.com/src-d/hercules > 1.pb
   - cp 1.pb 2.pb

+ 4 - 0
internal/plumbing/uast/test/utils.go

@@ -1,6 +1,7 @@
 package test
 
 import (
+	"fmt"
 	"io/ioutil"
 
 	bblfsh "gopkg.in/bblfsh/client-go.v2"
@@ -31,5 +32,8 @@ func ParseBlobFromTestRepo(hash, name string, client *bblfsh.Client) *uast.Node
 	if err != nil {
 		panic(err)
 	}
+	if response.UAST == nil {
+		panic(fmt.Sprintf("empty response for %s %s", name, hash))
+	}
 	return response.UAST
 }

+ 1 - 1
leaves/burndown.go

@@ -20,7 +20,7 @@ import (
 	"gopkg.in/src-d/hercules.v4/internal/pb"
 	items "gopkg.in/src-d/hercules.v4/internal/plumbing"
 	"gopkg.in/src-d/hercules.v4/internal/plumbing/identity"
-	"gopkg.in/src-d/hercules.v4/internal/yaml"
+	"gopkg.in/src-d/hercules.v4/yaml"
 )
 
 // BurndownAnalysis allows to gather the line burndown statistics for a Git repository.

+ 1 - 1
leaves/couples.go

@@ -13,7 +13,7 @@ import (
 	"gopkg.in/src-d/hercules.v4/internal/pb"
 	items "gopkg.in/src-d/hercules.v4/internal/plumbing"
 	"gopkg.in/src-d/hercules.v4/internal/plumbing/identity"
-	"gopkg.in/src-d/hercules.v4/internal/yaml"
+	"gopkg.in/src-d/hercules.v4/yaml"
 )
 
 // CouplesAnalysis calculates the number of common commits for files and authors.

internal/yaml/utils.go → yaml/utils.go