From 924885e532beabeba1917fcaf407bdacade9f42e Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Mon, 5 Nov 2018 08:58:26 -0800 Subject: [PATCH] fix redis issue in travis without building redis from source (#619) --- .travis.yml | 2 +- bin/setup-mastodon-in-travis.sh | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index c31782d..dadcad7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,8 +33,8 @@ addons: - postgresql-client-10 - postgresql-contrib-10 - protobuf-compiler + - redis-server - redis-tools - - tcl # required to build redis from source - zlib1g-dev before_install: - npm install -g npm@6 diff --git a/bin/setup-mastodon-in-travis.sh b/bin/setup-mastodon-in-travis.sh index 610fead..4d12d74 100755 --- a/bin/setup-mastodon-in-travis.sh +++ b/bin/setup-mastodon-in-travis.sh @@ -11,13 +11,12 @@ source "$HOME/.rvm/scripts/rvm" rvm install 2.5.1 rvm use 2.5.1 -# build redis from source until this is fixed: https://git.io/fxjkb -curl -O http://download.redis.io/redis-stable.tar.gz -tar -xzf redis-stable.tar.gz -cd redis-stable -make -sudo make install -redis-server --daemonize yes +# fix for redis IPv6 issue +# https://travis-ci.community/t/trusty-environment-redis-server-not-starting-with-redis-tools-installed/650/2 +sudo sed -e 's/^bind.*/bind 127.0.0.1/' /etc/redis/redis.conf > redis.conf +sudo mv redis.conf /etc/redis +sudo service redis-server start +echo PING | nc localhost 6379 # check redis running # install ffmpeg from PPA because it's not in Trusty sudo -E add-apt-repository -y ppa:mc3man/trusty-media