1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Add scripts to rake test on all rubies

Run ./multi_test.sh to test all rubies that are configured in
Dockerfile.
This commit is contained in:
Andrew Vos 2014-07-20 00:14:35 +01:00
parent 341c19f8ef
commit 81455ef211
3 changed files with 43 additions and 0 deletions

15
Dockerfile Normal file
View file

@ -0,0 +1,15 @@
FROM ubuntu:latest
RUN apt-get update -y
RUN apt-get install -y wget make git
RUN wget --no-check-certificate -O ruby-install-0.4.3.tar.gz https://github.com/postmodern/ruby-install/archive/v0.4.3.tar.gz
RUN tar -xzvf ruby-install-0.4.3.tar.gz
RUN cd ruby-install-0.4.3 && make install
RUN ruby-install ruby 1.9.3
RUN ruby-install ruby 2.1.1
RUN ruby-install ruby 2.1.2
ADD . /pry
WORKDIR /pry

4
multi_test.sh Executable file
View file

@ -0,0 +1,4 @@
#!/bin/bash -e
docker build -t pry/pry .
docker run -i -t -v /tmp/prytmp:/tmp/prytmp pry/pry ./multi_test_inside_docker.sh

24
multi_test_inside_docker.sh Executable file
View file

@ -0,0 +1,24 @@
#!/bin/bash -e
export ORIGINAL_PATH=$PATH
function test {
version=$1
export PATH=$ORIGINAL_PATH
export GEM_HOME=/tmp/prytmp/$version
export PATH=/opt/rubies/$version/bin:$GEM_HOME/bin:$PATH
export RUBY_ROOT=/opt/rubies/$version
if [ ! -f $GEM_HOME/bin/bundle ]; then
gem install bundler --no-rdoc --no-ri
fi
bundle install --quiet
rake test
}
for ruby in `ls /opt/rubies`
do
test $ruby || :
done