Skip to content

Commit 18ae2b6

Browse files
committed
chore: add scripts to install redis
Signed-off-by: Raymond Feng <enjoyjava@gmail.com>
1 parent 6a93723 commit 18ae2b6

3 files changed

Lines changed: 20 additions & 5 deletions

File tree

appveyor.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ services:
77
- mongodb
88

99
install:
10+
# Install the Redis
11+
- nuget install redis-64 -excludeversion
12+
- redis-64\tools\redis-server.exe --service-install
13+
- redis-64\tools\redis-server.exe --service-start
14+
- '@ECHO Redis Started'
1015
- ps: Install-Product node $env:nodejs_version
1116
- node --version
1217
- npm --version

bin/setup.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#!/bin/bash
2+
if [ -z "$CI" ]; then
3+
MONGO_CONTAINER_NAME="mongodb_c"
4+
docker rm -f $MONGO_CONTAINER_NAME
5+
docker pull mongo:latest
6+
docker run --name $MONGO_CONTAINER_NAME -p 27017:27017 -d mongo:latest
27

3-
CONTAINER_NAME="mongodb_c"
4-
docker rm -f $CONTAINER_NAME
5-
docker pull mongo:latest
6-
docker run --name $CONTAINER_NAME -p 27017:27017 -d mongo:latest
8+
REDIS_CONTAINER_NAME="redis_c"
9+
docker rm -f $REDIS_CONTAINER_NAME
10+
docker pull redis:latest
11+
docker run --name $REDIS_CONTAINER_NAME -p 6379:6379 -d redis:latest
12+
fi

bin/travis.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@ if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
77
echo "OSX => INSTALLING AND STARTING MONGODB"
88
brew install mongodb
99
brew services start mongodb
10+
11+
echo "OSX => INSTALLING AND STARTING REDIS"
12+
brew install redis
13+
brew services start redis
1014
fi
1115

1216
if [ $TASK = "test" ]; then
13-
echo "TASK => MONGODB STARTUP DELAY"
17+
echo "TASK => MONGODB/REDIS STARTUP DELAY"
1418
sleep 10
1519
fi

0 commit comments

Comments
 (0)