From c7f0483dd30b1c7ad1972ea135528dc95cc4ce32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Matczuk?= Date: Mon, 31 Jul 2017 13:29:40 +0200 Subject: [PATCH] run travis integration tests on scylla --- .travis.yml | 19 ++++++++++++++----- .travis_start_db.sh | 22 ++++++++++++++++++++++ 2 files changed, 36 insertions(+), 5 deletions(-) create mode 100755 .travis_start_db.sh diff --git a/.travis.yml b/.travis.yml index 9bef751..65c0d5d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,28 @@ language: go - go: - 1.8 - 1.7 -matrix: - fast_finish: true +env: + global: + - SCYLLA_OPTS="--network-stack posix --enable-in-memory-data-store 1 --developer-mode 1" + - SCYLLA_OPTS_LOG="--log-to-stdout 1 --default-log-level info" + matrix: + - DB="scylla" + - DB="cassandra" +sudo: true + +dist: trusty addons: apt: packages: - - moreutils + - moreutils + +before_install: + - ./.travis_start_db.sh install: - - sudo service cassandra start - make get-deps script: diff --git a/.travis_start_db.sh b/.travis_start_db.sh new file mode 100755 index 0000000..cbef56e --- /dev/null +++ b/.travis_start_db.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +set -e + +case ${DB} in + +scylla) + echo "deb [arch=amd64] http://s3.amazonaws.com/downloads.scylladb.com/deb/ubuntu trusty scylladb-1.7/multiverse" | sudo tee -a /etc/apt/sources.list > /dev/null + sudo apt-get -qq update + sudo apt-get install -y --allow-unauthenticated scylla-server + sudo /usr/bin/scylla --options-file /etc/scylla/scylla.yaml ${SCYLLA_OPTS} ${SCYLLA_OPTS_LOG} & + ;; + +cassandra) + sudo service cassandra start + ;; + +*) + env + false + ;; + +esac