From 91b4e75c6540d85efc2dc115b7915bae7bfd8bdf Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 29 Mar 2017 18:22:37 +0100 Subject: [PATCH] Restructure the TravisCI script The script should only run the tests; the base Docker image pull, as well as the CI image build, should be performed in the preparation stage. --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b7ae40b..dfd3e1c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,8 +21,10 @@ services: before_install: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull ebassi/epoxyci ; fi -script: +before_script: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM ebassi/epoxyci > Dockerfile ; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo ADD . /root >> Dockerfile ; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t withgit . ; fi + +script: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run withgit /bin/sh -c "cd /root && CC=$CC ./epoxy-run-tests.sh" ; fi