Skip to content

Commit b419995

Browse files
committed
fixing tests in circleCI w/docker #1538
1 parent 2fb2dcb commit b419995

File tree

5 files changed

+25
-10
lines changed

5 files changed

+25
-10
lines changed

Dockerfile

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,38 +32,50 @@ MAINTAINER Stanford Center for Reproducible Neuroscience <crn.poldracklab@gmail.
3232
# Preparations
3333
RUN ln -snf /bin/bash /bin/sh
3434
WORKDIR /root
35+
36+
# Install graphviz to provide dot
37+
ARG DEBIAN_FRONTEND=noninteractive
38+
RUN apt-get update && \
39+
apt-get install -y graphviz && \
40+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
41+
3542
RUN mkdir -p .nipype && \
3643
echo '[logging]' > .nipype/nipype.cfg && \
3744
echo 'workflow_level = DEBUG' >> .nipype/nipype.cfg && \
3845
echo 'interface_level = DEBUG' >> .nipype/nipype.cfg && \
3946
echo 'filemanip_level = DEBUG' >> .nipype/nipype.cfg
4047

41-
ADD docker/circleci/run_* /usr/bin/
42-
RUN chmod +x /usr/bin/run_*
43-
4448
# Install this branch's code
45-
WORKDIR /scratch/src
49+
WORKDIR /root/src
4650
ADD . nipype/
4751

4852
# Install the checked out version of nipype, check that requirements are
4953
# installed and install it for each of the three environments.
54+
# Additionally, install matplotlib and sphinx to build documentation
5055
RUN cd nipype/ && \
5156
source activate nipypetests-2.7 && \
57+
pip install matplotlib sphinx coverage && \
5258
pip install -r requirements.txt && \
5359
pip install -e .
5460

5561
RUN cd nipype/ && \
5662
source activate nipypetests-3.4 && \
63+
pip install matplotlib sphinx coverage && \
5764
pip install -r requirements.txt && \
5865
pip install -e .
5966

6067
RUN cd nipype/ && \
6168
source activate nipypetests-3.5 && \
69+
pip install matplotlib sphinx coverage && \
6270
pip install -r requirements.txt && \
6371
pip install -e .
6472

6573
WORKDIR /scratch
6674

75+
# Install entrypoints
76+
ADD docker/circleci/run_* /usr/bin/
77+
RUN chmod +x /usr/bin/run_*
78+
6779
# RUN echo 'source /etc/profile.d/nipype_tests.sh' >> /etc/bash.bashrc
6880
ENTRYPOINT ["/usr/bin/run_examples.sh"]
6981
CMD ["--help"]

circle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ test:
2727
timeout: 1600
2828
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench fmri_fsl_reuse Linear level1_workflow
2929
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench fmri_spm_nested Linear level1 l2pipeline
30-
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch --entrypoint="/usr/bin/run_nosetests.sh" nipype/testbench --xunit-file="/scratch/nose/${CIRCLE_PROJECT_REPONAME}.xml :
30+
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch --entrypoint="/usr/bin/run_nosetests.sh" nipype/testbench --xunit-file="/scratch/nose/${CIRCLE_PROJECT_REPONAME}.xml" :
3131
timeout: 2600
3232
post:
3333
- mkdir -p ${CIRCLE_TEST_REPORTS}/nose
3434
- mv ~/scratch/nose/${CIRCLE_PROJECT_REPONAME}.xml ${CIRCLE_TEST_REPORTS}/nose/
3535
- mkdir -p ~/docs
36-
- mv ~/scratch/nipype/doc/_build/html/* ~/docs/
36+
- mv ~/scratch/docs/* ~/docs/
3737
- mv ~/scratch/builddocs.log ~/docs/log.txt
3838

3939
general:

docker/circleci/run_builddocs.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ for i in /etc/profile.d/*.sh; do
44
done
55
source activate nipypetests-2.7
66

7-
set -o pipefail && cd /scratch/src/nipype/doc && make html 2>&1 | tee /scratch/builddoc.log
7+
mkdir -p /scratch/docs
8+
set -o pipefail && cd /root/src/nipype/doc && make html 2>&1 | tee /scratch/builddoc.log
9+
cp -r /root/src/nipype/doc/_build/html/* /scratch/docs/
810
cat /scratch/builddoc.log && if grep -q "ERROR" /scratch/builddoc.log; then false; else true; fi
911

docker/circleci/run_examples.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ for i in /etc/profile.d/*.sh; do
33
source $i
44
done
55
source activate nipypetests-2.7
6-
python /scratch/src/nipype/tools/run_examples.py $@
6+
python /root/src/nipype/tools/run_examples.py $@

docker/circleci/run_nosetests.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ for i in /etc/profile.d/*.sh; do
33
source $i
44
done
55
source activate nipypetests-2.7
6-
cd src/nipype
7-
nosetests --with-doctest -c ./.noserc --logging-level=DEBUG --verbosity=3 $@
6+
cd /root/src/nipype
7+
mkdir -p /scratch/nose
8+
nosetests --with-doctest -c /root/src/nipype/.noserc --logging-level=DEBUG --verbosity=3 $@

0 commit comments

Comments
 (0)