[SOLVED] Travis CI builds failed

Hello, I would like to make tests succeed. Here is what I get:

$ make test
govendor test +local
?       github.com/spf13/hugo   [no test files]
ok      github.com/spf13/hugo/bufferpool        0.023s
ok      github.com/spf13/hugo/commands  0.030s
?       github.com/spf13/hugo/config    [no test files]
ok      github.com/spf13/hugo/create    0.074s
?       github.com/spf13/hugo/deps      [no test files]
?       github.com/spf13/hugo/docshelper        [no test files]
ok      github.com/spf13/hugo/helpers   0.233s
ok      github.com/spf13/hugo/hugofs    0.028s
ok      github.com/spf13/hugo/hugolib   4.547s
ok      github.com/spf13/hugo/i18n      0.021s
?       github.com/spf13/hugo/livereload        [no test files]
ok      github.com/spf13/hugo/media     0.033s
ok      github.com/spf13/hugo/output    0.028s
ok      github.com/spf13/hugo/parser    0.019s
--- FAIL: TestReleaseNotesWriter (0.02s)
        Error Trace:    releasenotes_writer_test.go:37
        Error:          Received unexpected error:
                        git failed: "exit status 128": "fatal: v0.20^ n'est pas un nom d'objet valide\n"
FAIL
FAIL    github.com/spf13/hugo/releaser  0.055s
ok      github.com/spf13/hugo/source    0.021s
?       github.com/spf13/hugo/tpl       [no test files]
ok      github.com/spf13/hugo/tpl/tplimpl       2.107s
ok      github.com/spf13/hugo/transform 0.023s
?       github.com/spf13/hugo/utils     [no test files]
?       github.com/spf13/hugo/watcher   [no test files]
Error: exit status 1
Makefile:47 : la recette pour la cible « test » a échouée
make: *** [test] Erreur 2

If somebody has a clue on this issue…

I would suggest you rebase your branch against master.

Apparently you are right:

$ git checkout upstream/master
HEAD is now on 93a447c5... docs: Fix typos
$ make check
govendor test -race +local
?       github.com/spf13/hugo   [no test files]
ok      github.com/spf13/hugo/bufferpool        1.016s
ok      github.com/spf13/hugo/commands  1.094s
?       github.com/spf13/hugo/config    [no test files]
ok      github.com/spf13/hugo/create    1.367s
?       github.com/spf13/hugo/deps      [no test files]
?       github.com/spf13/hugo/docshelper        [no test files]
ok      github.com/spf13/hugo/helpers   1.464s
ok      github.com/spf13/hugo/hugofs    1.020s
ok      github.com/spf13/hugo/hugolib   16.829s
ok      github.com/spf13/hugo/i18n      1.043s
?       github.com/spf13/hugo/livereload        [no test files]
ok      github.com/spf13/hugo/media     1.018s
ok      github.com/spf13/hugo/output    1.072s
ok      github.com/spf13/hugo/parser    1.053s
--- FAIL: TestReleaseNotesWriter (0.01s)
        Error Trace:    releasenotes_writer_test.go:37
        Error:          Received unexpected error:
                        git failed: "exit status 128": "fatal: v0.20^ n'est pas un nom d'objet valide\n"
FAIL
FAIL    github.com/spf13/hugo/releaser  0.043s
ok      github.com/spf13/hugo/source    1.066s
?       github.com/spf13/hugo/tpl       [no test files]
ok      github.com/spf13/hugo/tpl/tplimpl       4.389s
ok      github.com/spf13/hugo/transform 1.071s
?       github.com/spf13/hugo/utils     [no test files]
?       github.com/spf13/hugo/watcher   [no test files]
Error: exit status 1
Makefile:50 : la recette pour la cible « test-race » a échouée
make: *** [test-race] Erreur 2

But I cannot see what to do…

https://github.com/spf13/hugo/commit/8f95172c7af334f61d75faad74cc75016804eca6

1 Like

Thank you for that change. I am currently updating the code with your latest modifications on the tpl/ directory structure. But I don’t know if I am doing right.

OK here is what I have done:

  • I rebased my branch against upstream/master in a new git repository
  • I updated my code to the very latest commit that has been merged (tpl/ namespaces)
  • I ran every check (make hugo, make check, make hugo-race check) and gofmt possible, and everything passes like a charm on my environment.
  • I gathered everything new in a single commit and pushed it.

Then the Travis CI are still failing, here are the specific errors:

$ make hugo-race check
go get GitHub - kardianos/govendor: Use Go Modules.
govendor sync GitHub - gohugoio/hugo: The world’s fastest framework for building websites.
go build -race -ldflags “-X github.com/spf13/hugo/hugolib.CommitHash=git rev-parse --short HEAD 2>/dev/null -X github.com/spf13/hugo/hugolib.BuildDate=date +%FT%T%zGitHub - gohugoio/hugo: The world’s fastest framework for building websites.
can’t load package: package github.com/spf13/hugo: cannot find package “GitHub - gohugoio/hugo: The world’s fastest framework for building websites.” in any of:
/home/travis/.gimme/versions/go1.7.5.linux.amd64/src/github.com/spf13/hugo (from $GOROOT)
/home/travis/gopath/src/github.com/spf13/hugo (from $GOPATH)
make: *** [hugo-race] Error 1
The command “make hugo-race check” exited with 2.
0.01s$ ./hugo -s docs/
/home/travis/.travis/job_stages: line 53: ./hugo: No such file or directory
The command “./hugo -s docs/” exited with 127.
0.00s$ ./hugo --renderToMemory -s docs/
/home/travis/.travis/job_stages: line 53: ./hugo: No such file or directory
The command “./hugo --renderToMemory -s docs/” exited with 127.
Done. Your build exited with 1.

deploy/netlify and license/cla are passing now, but neither continuous-integration/travis-ci/pr nor continuous-integration/appveyor/pr are doing well.

What do you think I am doing wrong? Thank you!!

EDIT: It works now. I updated the code to match with the latest commits. Dunno if that was the problem. This CI system seems to be a little capricious sometimes!


I still have errors on my project at travis ci but it is failed at that time.