From 1283febdd6aa5ac53db8d0e9ef13abce1fed1147 Mon Sep 17 00:00:00 2001 From: Peng Tao Date: Thu, 23 Jul 2020 11:38:58 +0800 Subject: [PATCH] ci: checkout TRAVIS_BRANCH So that we use 2.0-dev branch for tests. Fixes: kata-containers/tests#2732 Signed-off-by: Peng Tao --- ci/lib.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ci/lib.sh b/ci/lib.sh index 76734f1f55..e40e696501 100644 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -16,6 +16,10 @@ clone_tests_repo() fi go get -d -u "$tests_repo" || true + + if [ -n "${TRAVIS_BRANCH:-}" ]; then + ( cd "${tests_repo_dir}" && git checkout "${TRAVIS_BRANCH}" ) + fi } run_static_checks()