Add docker files for local testing.
* Use docker to locally run tests on multiple perl versions * perlbrew used to install multiple perls * perl environments bootstrapped when image built * Based on travis configuration * Adds docker folder to MANIFEST.SKIP * Running image runs all tests. * If exit with no error, then all tests pass. * ./build-docker.sh builds stow testing image. * ./test-docker.sh runs stow testing image. * Assumes built with options in build-docker.sh * *-docker.sh scripts added to MANIFEST.SKIP
This commit is contained in:
parent
c171ca8d83
commit
95ffbc5ebd
6 changed files with 106 additions and 0 deletions
47
docker/Dockerfile
Normal file
47
docker/Dockerfile
Normal file
|
@ -0,0 +1,47 @@
|
|||
# Build docker image: `docker build -t stowtest`
|
||||
# Run tests: (from stow src directory)
|
||||
# `docker run --rm -it -v $(pwd):$(pwd) -w $(pwd) stowtest`
|
||||
FROM debian:jessie
|
||||
RUN DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get clean && \
|
||||
apt-get update -qq && \
|
||||
apt-get install -y -q \
|
||||
autoconf \
|
||||
bzip2 \
|
||||
cpanminus \
|
||||
gawk \
|
||||
git \
|
||||
libssl-dev \
|
||||
make \
|
||||
patch \
|
||||
perlbrew \
|
||||
texinfo \
|
||||
texlive \
|
||||
texi2html \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set up perlbrew
|
||||
ENV HOME=/root \
|
||||
PERLBREW_ROOT=/usr/local/perlbrew \
|
||||
PERLBREW_HOME=/root/.perlbrew \
|
||||
PERLBREW_PATH=/usr/local/perlbrew/bin
|
||||
RUN mkdir -p /usr/local/perlbrew /root \
|
||||
&& perlbrew init \
|
||||
&& perlbrew install-cpanm \
|
||||
&& perlbrew install-patchperl \
|
||||
&& perlbrew install-multiple -j 4 --notest \
|
||||
perl-5.22.2 \
|
||||
perl-5.20.3 \
|
||||
perl-5.18.4 \
|
||||
perl-5.16.3 \
|
||||
perl-5.14.4 \
|
||||
&& perlbrew clean
|
||||
|
||||
# Bootstrap the perl environments
|
||||
COPY ./bootstrap-perls.sh /bootstrap-perls.sh
|
||||
RUN /bootstrap-perls.sh && rm /bootstrap-perls.sh
|
||||
|
||||
# Add test script to container filesystem
|
||||
COPY ./run-stow-tests.sh /run-stow-tests.sh
|
||||
|
||||
ENTRYPOINT ["/run-stow-tests.sh"]
|
Loading…
Add table
Add a link
Reference in a new issue