Skip to content

Commit

Permalink
chore: add scripts to install redis
Browse files Browse the repository at this point in the history
Signed-off-by: Raymond Feng <[email protected]>
  • Loading branch information
raymondfeng committed Aug 28, 2018
1 parent 6a93723 commit e8591c5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ environment:

services:
- mongodb
- redis

install:
- ps: Install-Product node $env:nodejs_version
Expand Down
14 changes: 10 additions & 4 deletions bin/setup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#!/bin/bash
if [ -z "$CI" ]; then
MONGO_CONTAINER_NAME="mongodb_c"
docker rm -f $MONGO_CONTAINER_NAME
docker pull mongo:latest
docker run --name $MONGO_CONTAINER_NAME -p 27017:27017 -d mongo:latest

CONTAINER_NAME="mongodb_c"
docker rm -f $CONTAINER_NAME
docker pull mongo:latest
docker run --name $CONTAINER_NAME -p 27017:27017 -d mongo:latest
REDIS_CONTAINER_NAME="redis_c"
docker rm -f $REDIS_CONTAINER_NAME
docker pull redis:latest
docker run --name $REDIS_CONTAINER_NAME -p 6379:6379 -d redis:latest
fi
6 changes: 5 additions & 1 deletion bin/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
echo "OSX => INSTALLING AND STARTING MONGODB"
brew install mongodb
brew services start mongodb

echo "OSX => INSTALLING AND STARTING REDIS"
brew install redis
brew services start redis
fi

if [ $TASK = "test" ]; then
echo "TASK => MONGODB STARTUP DELAY"
echo "TASK => MONGODB/REDIS STARTUP DELAY"
sleep 10
fi

0 comments on commit e8591c5

Please sign in to comment.