Skip to content

Commit

Permalink
nightly - test redis versions (#81)
Browse files Browse the repository at this point in the history
Add nightly functional tests for redis 3, 4 & 5 versions
  • Loading branch information
benoitvidis authored and alexandrebouthinon committed May 20, 2019
1 parent 37fbfd6 commit b17ee5a
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 17 deletions.
57 changes: 49 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ install:
jobs:
include:

# -------------------------------------------------------------------------
# Unit tests
# -------------------------------------------------------------------------
- name: Unit tests
if: type = pull_request OR type = cron OR type = push AND branch =~ ^master|.*-dev
script:
Expand All @@ -22,10 +25,48 @@ jobs:
- npm run codecov
- bash test/travis-bin/sonar.sh

- name: Functional tests
if: type = cron OR (type = push OR type = pull_request) AND branch =~ ^master|.*-dev
# -------------------------------------------------------------------------
# Functional tests - Redis 3.2
# -------------------------------------------------------------------------
- name: Functional tests - Redis 3.2
if: type = cron OR type = push AND branch = master
env:
- DOCKER_COMPOSE_VERSION=1.24.0
- REDIS_VERSION=3.2
before_install:
- sudo rm /usr/local/bin/docker-compose
- sudo curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
- sudo sysctl -w vm.max_map_count=262144
- sudo sysctl -w fs.inotify.max_user_watches=524288
script:
- bash test/travis-bin/functional-tests.sh

# -------------------------------------------------------------------------
# Functional tests - Redis 4
# -------------------------------------------------------------------------
- name: Functional tests- Redis 4
if: type = cron OR type = push AND branch = master
env:
- DOCKER_COMPOSE_VERSION=1.24.0
- REDIS_VERSION=4
before_install:
- sudo rm /usr/local/bin/docker-compose
- sudo curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
- sudo sysctl -w vm.max_map_count=262144
- sudo sysctl -w fs.inotify.max_user_watches=524288
script:
- bash test/travis-bin/functional-tests.sh

# -------------------------------------------------------------------------
# Functional tests - Redis 5
# -------------------------------------------------------------------------
- name: Functional tests - Redis 5
if: type = cron OR type = push AND branch = master
env:
- DOCKER_COMPOSE_VERSION=1.24.0
- REDIS_VERSION=5
before_install:
- sudo rm /usr/local/bin/docker-compose
- sudo curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
Expand All @@ -36,13 +77,13 @@ jobs:
- bash test/travis-bin/functional-tests.sh

notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/8e145155fbaaf37cffea
on_success: change
on_failure: always
on_start: never
email: false

slack:
rooms:
- secure: "qMcRdKvIcnc56pQsHBgRDOAMbpIwMNd/brT8Vib+iA96JVpZz4voehRbQ4n7qOZER7riA4eXorcOLZQ1m3M+vyx247LePnDA5w2TWFmKy9nc6KMefB4m6ZktSFMWS/4J4rdj+jivEYAsM+xIo489lukWa1Y463bkg5KdWapEbgaEE0Jv1X5nElkSwazuUcRVMr9iEt0sA6So5dUx9nvi7P9u+KBC7kchfdh15+a7fhTKH1AltkHalPweVEeqbLRnwWNV43+hRI6oIgnuPITY4+/bgh47V/SIEAdUSZoEtdz+PeiyNEYCPgvDPKf3C1lL1bhQURpt6qgaO2Ocu9dIa3ZrSe89gTK0SD0GI3cQlxA8ODp19au55EBumLxceuIIThnvSqb9QLjqYcILQpDG3mkki4VsipP7h1Zzg0bF8ysHSeaeqv+55aIJo7POx2wVM1YXW7qVugMov0bC9gyu72I8iwn7jTPE5NQT7NJfL3STOHGy75tXSzYLN6VwvdGKhQScroIgPbsO8rkdzZad9e1G2w/s1IpnawD7H2FY1Mrb+FMcg9JJ6oLY7rmkK6Ol1cBxAtTO7qPQ7/bE8hax5uLWFEd6+r5RGIPbk7UtKd43pXIos7ajuKxX+7ovkwmZ7mioEuMvRF1DJbiw7LWTe65W35h2o7B4OIflgg/zlPE="
on_success: never
on_failure: always

addons:
sonarcloud: true
7 changes: 5 additions & 2 deletions docker-compose/docker-compose.yml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ services:
DEBUG_COLORS: ${DOLLAR}{DEBUG_COLORS:-on}

redis:
build: ./redis
build:
context: ./redis
args:
- REDIS_VERSION=${DOLLAR}{REDIS_VERSION:-4.0}
command: redis-server /usr/local/etc/redis/redis.conf

redis_init_cluster:
Expand All @@ -36,7 +39,7 @@ services:
- redis

elasticsearch:
image: kuzzleio/elasticsearch:5.4.1
image: kuzzleio/elasticsearch:5.6.10
ulimits:
nofile: 65536
environment:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose/images/kuzzle/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM kuzzleio/kuzzle
FROM kuzzleio/kuzzle:1-dev

RUN set -x \
\
Expand Down
3 changes: 2 additions & 1 deletion docker-compose/redis/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM redis:4.0
ARG REDIS_VERSION=5
FROM redis:$REDIS_VERSION
MAINTAINER Kuzzle <[email protected]>

COPY redis.conf /usr/local/etc/redis/redis.conf
Expand Down
6 changes: 1 addition & 5 deletions test/travis-bin/functional-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@ set -e

docker pull kuzzleio/kuzzle

# git clone kuzzle
cd /tmp/
git clone --recursive -b 1-dev https://github.com/kuzzleio/kuzzle.git

cd "$TRAVIS_BUILD_DIR"
echo "KUZ_PATH=/tmp/kuzzle" > docker-compose/my.env
touch docker-compose/my.env

./dev-npm-install.sh

Expand Down

0 comments on commit b17ee5a

Please sign in to comment.