Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Commit

Permalink
Adding travis and tox configuration to run the app engine tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Wayne Parrott committed Aug 17, 2015
1 parent 77e609f commit 86d0826
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 9 deletions.
19 changes: 11 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ python: 2.7
sudo: false
env:
matrix:
- TOX_ENV=py26
- TOX_ENV=py27
- TOX_ENV=py33
- TOX_ENV=py34
- TOX_ENV=pypy
- TOX_ENV=docs
- TOX_ENV=system-tests
- TOX_ENV=system-tests3
# - TOX_ENV=py26
# - TOX_ENV=py27
# - TOX_ENV=py33
# - TOX_ENV=py34
# - TOX_ENV=pypy
# - TOX_ENV=docs
# - TOX_ENV=system-tests
# - TOX_ENV=system-tests3
- TOX_ENV=gae
global:
- GAE_PYTHONPATH=$HOME/google_appengine
install:
- ./scripts/install.sh
script:
Expand Down
8 changes: 8 additions & 0 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,11 @@ if [[ "${TOX_ENV}" == "pypy" ]]; then
pyenv install pypy-2.6.0
pyenv global pypy-2.6.0
fi

if [[ "${TOX_ENV}" == "gae" && ! -d $HOME/google_appengine ]]; then
cd $HOME
wget https://storage.googleapis.com/appengine-sdks/featured/google_appengine_1.9.25.zip
unzip -q google_appengine_1.9.25.zip
# Directory is required for the App Assertion tests to pass.
mkdir -p $HOME/.config/gcloud
fi
10 changes: 10 additions & 0 deletions tests/data/app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Dummy app.yaml to placate nosegae.
application: oauth2client
version: 1
runtime: python27
api_version: 1
threadsafe: yes

handlers:
- url: /.*
script: null.app
11 changes: 10 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py26,py27,py33,py34,pypy,cover
envlist = py26,py27,py33,py34,pypy,gae,cover

[testenv]
basedeps = keyring
Expand Down Expand Up @@ -51,6 +51,15 @@ basepython = python2.6
deps = {[testenv]basedeps}
django>=1.5,<1.6

[testenv:gae]
basepython = python2.7
deps = {[testenv]basedeps}
nosegae
commands =
nosetests --with-gae --gae-application=tests/data --logging-level=INFO {posargs} tests/test_appengine.py
setenv:
PYTHONPATH={env:GAE_PYTHONPATH:}

[testenv:system-tests]
basepython =
python2.7
Expand Down

0 comments on commit 86d0826

Please sign in to comment.