-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
83 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
sudo: false | ||
dist: xenial | ||
addons: | ||
apt: | ||
packages: | ||
- libevent-dev | ||
cache: | ||
pip: true | ||
directories: | ||
- zookeeper | ||
language: python | ||
python: | ||
- '3.7' | ||
matrix: | ||
include: | ||
- python: '2.7' | ||
env: TOX_ENV=py27 | ||
- python: '3.4' | ||
env: TOX_ENV=py34 | ||
- python: '3.5' | ||
env: TOX_ENV=py35 | ||
- python: '3.6' | ||
env: TOX_ENV=py36 | ||
# - python: '3.7' | ||
# env: TOX_ENV=py37 | ||
# - python: '3.8' | ||
# env: TOX_ENV=py38 | ||
# - python: pypy | ||
# env: TOX_ENV=pypy | ||
# - python: pypy3 | ||
# env: TOX_ENV=pypy3 | ||
notifications: | ||
email: false | ||
install: | ||
- pip install tox codecov | ||
- ZOOKEEPER_VERSION=3.4.9 bash -x ./tools/ci/ensure-zookeeper-env.sh | ||
script: | ||
- export ZOOKEEPER_PATH="$(pwd)/zookeeper/3.4.9/lib" | ||
- tox -e $TOX_ENV | ||
- codecov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env bash | ||
|
||
# base on https://github.com/python-zk/kazoo/blob/master/ensure-zookeeper-env.sh | ||
|
||
set -euo pipefail | ||
set -x | ||
IFS=$'\n\t' | ||
|
||
HERE=$(pwd) | ||
ZOO_BASE_DIR="$HERE/zookeeper" | ||
ZOOKEEPER_VERSION=${ZOOKEEPER_VERSION:-3.4.9} | ||
ZOOKEEPER_PATH="$ZOO_BASE_DIR/$ZOOKEEPER_VERSION" | ||
ZOOKEEPER_PREFIX="${ZOOKEEPER_PREFIX:-}" | ||
ZOOKEEPER_SUFFIX="${ZOOKEEPER_SUFFIX:-}" | ||
ZOOKEEPER_LIB="${ZOOKEEPER_LIB:-lib}" | ||
ZOO_MIRROR_URL="http://archive.apache.org/dist" | ||
|
||
|
||
function download_zookeeper(){ | ||
mkdir -p "$ZOO_BASE_DIR" | ||
cd "$ZOO_BASE_DIR" | ||
curl --silent -C - "$ZOO_MIRROR_URL/zookeeper/zookeeper-$ZOOKEEPER_VERSION/${ZOOKEEPER_PREFIX}zookeeper-${ZOOKEEPER_VERSION}${ZOOKEEPER_SUFFIX}.tar.gz" | tar -zx | ||
mv "${ZOOKEEPER_PREFIX}zookeeper-${ZOOKEEPER_VERSION}${ZOOKEEPER_SUFFIX}" "$ZOOKEEPER_VERSION" | ||
chmod a+x "$ZOOKEEPER_PATH/bin/zkServer.sh" | ||
} | ||
|
||
if [ ! -d "$ZOOKEEPER_PATH" ]; then | ||
download_zookeeper | ||
echo "Downloaded zookeeper $ZOOKEEPER_VERSION to $ZOOKEEPER_PATH" | ||
else | ||
echo "Already downloaded zookeeper $ZOOKEEPER_VERSION to $ZOOKEEPER_PATH" | ||
fi | ||
|
||
# Used as install_path when starting ZK | ||
export ZOOKEEPER_PATH="${ZOOKEEPER_PATH}/${ZOOKEEPER_LIB}" | ||
echo "$ZOOKEEPER_PATH" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters