Skip to content

Commit

Permalink
Merge pull request #6 from Lakion/cache-dir
Browse files Browse the repository at this point in the history
Refactored Travis caching
  • Loading branch information
Paweł Jędrzejewski committed Sep 14, 2015
2 parents 6af4923 + 2c2bbba commit 2b7e62b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
language: php

env:
global:
- MINK_DEBUG_CACHE_DIR=$HOME/.mink-debug-cache

cache:
directories:
- bin
- vendor
- $HOME/.composer/cache
- $HOME/.mink-log-cache
- $MINK_DEBUG_CACHE_DIR

php:
- 7.0
Expand All @@ -14,7 +18,7 @@ php:
- hhvm

before_install:
- mkdir -p $HOME/.mink-log-cache
- mkdir -p $MINK_DEBUG_CACHE_DIR
- travis/run-selenium

before_script:
Expand Down
6 changes: 3 additions & 3 deletions travis/run-selenium
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
sh -e /etc/init.d/xvfb start
export DISPLAY=:99

if [ ! -f $HOME/.mink-log-cache/selenium.jar ]; then
curl -s http://selenium-release.storage.googleapis.com/2.47/selenium-server-standalone-2.47.1.jar > $HOME/.mink-log-cache/selenium.jar
if [ ! -f "$MINK_DEBUG_CACHE_DIR/selenium.jar" ]; then
curl -s http://selenium-release.storage.googleapis.com/2.47/selenium-server-standalone-2.47.1.jar > "$MINK_DEBUG_CACHE_DIR/selenium.jar"
fi

java -jar $HOME/.mink-log-cache/selenium.jar > /dev/null 2>&1 &
java -jar "$MINK_DEBUG_CACHE_DIR/selenium.jar" > /dev/null 2>&1 &

0 comments on commit 2b7e62b

Please sign in to comment.