Repository: incubator-beam
Updated Branches:
  refs/heads/python-sdk e3a43fb5c -> d5719a5aa


Travis config for python tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/bd8b5ad2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/bd8b5ad2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/bd8b5ad2

Branch: refs/heads/python-sdk
Commit: bd8b5ad2a4fb966d732ecf17f7ed846b6ef0e27f
Parents: e3a43fb
Author: Ahmet Altay <al...@google.com>
Authored: Tue Jun 21 14:18:24 2016 -0700
Committer: Davor Bonaci <da...@google.com>
Committed: Wed Jun 22 18:56:02 2016 -0700

----------------------------------------------------------------------
 .travis.yml         | 22 +++++++++++++++++++---
 sdks/python/tox.ini | 24 ++++++++++++++++++++++++
 2 files changed, 43 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/bd8b5ad2/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 6d81689..ec74fa4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -28,6 +28,11 @@ notifications:
     on_success: change
     on_failure: always
 
+addons:
+  apt:
+    packages:
+    - python2.7
+
 matrix:
   include:
     # On OSX, run with default JDK only.
@@ -40,15 +45,26 @@ matrix:
       env: CUSTOM_JDK="oraclejdk7" MAVEN_OVERRIDE="-DforkCount=0"
     - os: linux
       env: CUSTOM_JDK="openjdk7" MAVEN_OVERRIDE="-DforkCount=0"
+    # Python SDK environments.
+    - os: osx
+      env: TEST_PYTHON="1"
+    - os: linux
+      env: TEST_PYTHON="1"
 
 before_install:
   - echo "MAVEN_OPTS='-Xmx2048m -XX:MaxPermSize=512m'" > ~/.mavenrc
   - if [ "$TRAVIS_OS_NAME" == "osx" ]; then export 
JAVA_HOME=$(/usr/libexec/java_home); fi
   - if [ "$TRAVIS_OS_NAME" == "linux" ]; then jdk_switcher use "$CUSTOM_JDK"; 
fi
+  # Python SDK environment settings.
+  - export TOX_ENV=py27
+  - if [ "$TRAVIS_OS_NAME" == "osx" ]; then export 
TOX_HOME=$HOME/Library/Python/2.7/bin; fi
+  - if [ "$TRAVIS_OS_NAME" == "linux" ]; then export 
TOX_HOME=$HOME/.local/bin; fi
 
 install:
-  - travis_retry mvn -B install clean -U -DskipTests=true
+  - if [ ! "$TEST_PYTHON" ]; then travis_retry mvn -B install clean -U 
-DskipTests=true; fi
+  - if [ "$TEST_PYTHON" ]; then travis_retry pip install tox --user `whoami`; 
fi
 
 script:
-  - travis_retry mvn -B $MAVEN_OVERRIDE install -U
-  - travis_retry testing/travis/test_wordcount.sh
+  - if [ "$TEST_PYTHON" ]; then travis_retry $TOX_HOME/tox -e $TOX_ENV -c 
sdks/python/tox.ini; fi
+  - if [ ! "$TEST_PYTHON" ]; then travis_retry mvn -B $MAVEN_OVERRIDE install 
-U; fi
+  - if [ ! "$TEST_PYTHON" ]; then travis_retry 
testing/travis/test_wordcount.sh; fi

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/bd8b5ad2/sdks/python/tox.ini
----------------------------------------------------------------------
diff --git a/sdks/python/tox.ini b/sdks/python/tox.ini
new file mode 100644
index 0000000..c0208b5
--- /dev/null
+++ b/sdks/python/tox.ini
@@ -0,0 +1,24 @@
+;
+;    Licensed to the Apache Software Foundation (ASF) under one or more
+;    contributor license agreements.  See the NOTICE file distributed with
+;    this work for additional information regarding copyright ownership.
+;    The ASF licenses this file to You under the Apache License, Version 2.0
+;    (the "License"); you may not use this file except in compliance with
+;    the License.  You may obtain a copy of the License at
+;
+;       http://www.apache.org/licenses/LICENSE-2.0
+;
+;    Unless required by applicable law or agreed to in writing, software
+;    distributed under the License is distributed on an "AS IS" BASIS,
+;    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;    See the License for the specific language governing permissions and
+;    limitations under the License.
+;
+
+[tox]
+envlist = py27
+
+[testenv:py27]
+commands =
+  python setup.py test
+passenv = TRAVIS*

Reply via email to