From f48d6fc168253209bed3f1dd5a543f15d1f54669 Mon Sep 17 00:00:00 2001 From: Martin Babinsky Date: Wed, 21 Dec 2016 10:16:47 +0100 Subject: [PATCH] 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 --- .travis.yml | 2 ++ .travis_run_task.sh | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2e60e292f..4f36b82cb 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 2163a9b71..4eb78c9c6 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