travis-ci: setup "prove cache" in "script" step
authorLars Schneider <larsxschneider@gmail.com>
Fri, 5 May 2017 15:40:52 +0000 (17:40 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 11 May 2017 09:44:54 +0000 (18:44 +0900)
The command that made the "prove cache" persistent across builds was
executed in the "before_install" step. Consequently, every job that
wanted to make use of the cache had to run this step.

The "prove cache" is only used in the "script" step for the
"make test" command. Therefore, we should configure the "prove cache"
in this step.

This change is useful for a subsequent patch that adds a job which does
not need the "before_install" step but wants to run the "script" step to
execute the tests.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
.travis.yml
index 1b32c98f2cd71dc3cc559fd7efc709a5bd65ac1f..f96f09ce9dfa5b65450c69b9354d50b64bf5742f 100644 (file)
@@ -134,12 +134,14 @@ before_install:
     p4 -V | grep Rev.;
     echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)";
     git-lfs version;
-    mkdir -p $HOME/travis-cache;
-    ln -s $HOME/travis-cache/.prove t/.prove;
 
 before_script: make --jobs=2
 
-script: make --quiet test
+script:
+  - >
+    mkdir -p $HOME/travis-cache;
+    ln -s $HOME/travis-cache/.prove t/.prove;
+    make --quiet test;
 
 after_failure:
   - >