FAQ
Hi,

I have several go projects which run on GAE. I wish to establish CI (or at
least testing upon push to GitHub) with Travis for some these projects.

To begin with, I am trying to get Travis to execute my apps tests. To
achieve this, my .travis file looks like this:
language: go
go:
   - "1.2.1"

install:
   - curl -O
https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-1.9.12.zip
&& unzip -q go_appengine_sdk_linux_amd64-1.9.12.zip

before_script: ./go_appengine/goapp get
script: ./go_appengine/goapp test

Problem is: the goapp get command returns status code 1 (which indicates
error and thus will stop the build) because some GAE packages do not
contain a "buildable go source". For example, anything that imports
package "code.google.com/p/google-api-go-client/bigquery/v2" will get this
error when you run:

goapp get

you get this message:

imports code.google.com/p/goauth2/appengine/serviceaccount: no buildable Go
source files in
/users/orcaman/src/code.google.com/p/goauth2/appengine/serviceaccount

Yet after performing the goapp get, everything basically works albeit the
error (I guess this is because the goapp executable knows how to treat
these GAE packages). so running:

goapp test

for a testing code that uses
code.google.com/p/goauth2/appengine/serviceaccount locally works perfectly.

Any ideas on how to work around this to be be able to use Travis with GAE's
Go?

Cheers,
Or


--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • David Symonds at Sep 27, 2014 at 9:08 pm
    Have you tried using `goapp get -d <blah>`?

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Orhiltch at Sep 28, 2014 at 5:30 am
    Thanks for the tip David.

    Unforunately adding the -d flag did not solve the issue:


    16.97s$ ./go_appengine/goapp get -d

    package code.google.com/p/goauth2/appengine/serviceaccount

      imports code.google.com/p/goauth2/appengine/serviceaccount

      imports code.google.com/p/goauth2/appengine/serviceaccount: no buildable Go source files in /home/travis/gopath/src/code.google.com/p/goauth2/appengine/serviceaccount

    The command "./go_appengine/goapp get -d" failed and exited with 1 during .


    I ended up writing the goapp get command as a shell script that always
    returns 0 for now. So in my .tavis file I have:
    before_script: ./script/ci/get_deps.sh
    and in the get_deps.sh I've got:

    #!/bin/sh
    echo "running goapp get to fetch dependencies..."
    ./go_appengine/goapp get
    echo "dependencies fetched."
    exit 0

    This works as a workaround (because even though the script always returns
    0, if the dep failed to be fetched, then the compilation would fail in the
    next step, so not a very silent failure) but obviously not ideal.
    On Sunday, September 28, 2014 12:08:21 AM UTC+3, David Symonds wrote:

    Have you tried using `goapp get -d <blah>`?
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedSep 27, '14 at 5:17p
activeSep 28, '14 at 5:30a
posts3
users2
websitegolang.org

2 users in discussion

Orhiltch: 2 posts David Symonds: 1 post

People

Translate

site design / logo © 2022 Grokbase