Víctor M
Víctor M

Reputation: 329

Travis CI with GAE and django

I am having some problems when I am using google python SDK in Travis-CI. I'm always getting this exception:

Failure: ImportError (No module named google.appengine.api) ... ERROR

I think the problem is in my travis file or django settings file. Can I use the GAE SDK API in the Travis platform?

I write down my .travis.yml file:

language: python

python:
  - "2.7"

before_script:
  - wget https://storage.googleapis.com/appengine-sdks/featured/google_appengine_1.9.10.zip -nv
  - unzip -q google_appengine_1.9.10.zip
  - mysql -e 'create database DATABASE_NAME;'
  - echo "USE mysql;\nUPDATE user SET password=PASSWORD('A_PASSWORD') WHERE user='USER';\nFLUSH PRIVILEGES;\n" | mysql -u USER
  - python manage.py syncdb --noinput

install:
  - pip install -r requirements.txt
  - pip install mysql-python

script: python manage.py test --with-coverage

branches:
  only:
    - testing

Thank you

Upvotes: 1

Views: 160

Answers (1)

Víctor M
Víctor M

Reputation: 329

After trying a lot I solved it adding this in my travis.yml file in the before_script section after the unzip order:

- export PYTHONPATH=${PYTHONPATH}:google_appengine

Upvotes: 2

Related Questions