From f48d6fc168253209bed3f1dd5a543f15d1f54669 Mon Sep 17 00:00:00 2001 From: Martin Babinsky Date: Jan 05 2017 15:21:51 +0000 Subject: Travis CI: use specific Python version during build This is a preparatory work for the future requirement of running Python2/3 jobs simultaneously. Reviewed-By: Stanislav Laznicka Reviewed-By: Fraser Tweedale --- diff --git a/.travis.yml b/.travis.yml index 2e60e29..4f36b82 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,8 @@ language: python services: - docker +python: + - "2.7" cache: pip env: global: diff --git a/.travis_run_task.sh b/.travis_run_task.sh index 2163a9b..4eb78c9 100755 --- a/.travis_run_task.sh +++ b/.travis_run_task.sh @@ -1,8 +1,8 @@ #!/bin/bash # NOTE: this script is intended to run in Travis CI only -set -ev +PYTHON="/usr/bin/python${TRAVIS_PYTHON_VERSION}" test_set="" developer_mode_opt="--developer-mode" @@ -29,6 +29,7 @@ docker pull $TEST_RUNNER_IMAGE ipa-docker-test-runner -l $CI_RESULTS_LOG \ -c $TEST_RUNNER_CONFIG \ $developer_mode_opt \ + --container-environment "PYTHON=$PYTHON" \ --container-image $TEST_RUNNER_IMAGE \ --git-repo $TRAVIS_BUILD_DIR \ $TASK_TO_RUN $test_set