2015-09-21 22:19:09 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2015-11-17 20:08:18 +00:00
|
|
|
set -e
|
2015-09-21 22:19:09 +00:00
|
|
|
|
2015-11-17 20:08:18 +00:00
|
|
|
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
2015-09-21 22:19:09 +00:00
|
|
|
|
2015-11-17 20:08:18 +00:00
|
|
|
docker build -t internetarchive/rethinkdb $script_dir
|
2015-09-22 21:32:53 +00:00
|
|
|
|
2015-09-21 22:19:09 +00:00
|
|
|
for python in python2.7 python3.4
|
|
|
|
do
|
2015-11-17 20:08:18 +00:00
|
|
|
docker run --rm -it --volume="$script_dir/..:/rethinkstuff" internetarchive/rethinkdb /sbin/my_init -- \
|
2015-11-17 20:38:10 +00:00
|
|
|
bash -x -c "cd /tmp && git clone /rethinkstuff \
|
2015-11-17 20:08:18 +00:00
|
|
|
&& cd /tmp/rethinkstuff \
|
2015-11-17 20:38:10 +00:00
|
|
|
&& (cd /rethinkstuff && git diff) | patch -p1 \
|
2015-11-17 20:08:18 +00:00
|
|
|
&& virtualenv -p $python /tmp/venv \
|
|
|
|
&& source /tmp/venv/bin/activate \
|
|
|
|
&& pip install pytest . \
|
|
|
|
&& py.test -v -s tests"
|
2015-09-21 22:19:09 +00:00
|
|
|
done
|