Skip to content

Commit 7891e0d

Browse files
committed
Revert #1889
1 parent 0d1084d commit 7891e0d

File tree

4 files changed

+19
-24
lines changed

4 files changed

+19
-24
lines changed

.circle/codecov.sh

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,5 @@ set -u # Treat unset variables as an error when substituting.
1010
set -x # Print command traces before executing command.
1111

1212
# Send coverage data to codecov.io
13-
curl -so codecov.io https://codecov.io/bash
14-
chmod 755 codecov.io
15-
16-
find "${WORKDIR}/tests/" -name 'coverage*.xml' -maxdepth 1 -print0 | \
17-
xargs -0 -I file ./codecov.io -f file -t "${CODECOV_TOKEN}" -F unittests
18-
find "${WORKDIR}/tests/" -name 'smoketest*.xml' -maxdepth 1 -print0 | \
19-
xargs -0 -I file ./codecov.io -f file -t "${CODECOV_TOKEN}" -F smoketests
20-
13+
${HOME}/bin/codecov -f "coverage*.xml" -s "${WORKDIR}/tests/" -R "${HOME}/nipype/" -F unittests -v -K
14+
${HOME}/bin/codecov -f "smoketest*.xml" -s "${WORKDIR}/tests/" -R "${HOME}/nipype/" -F smoketests -v -K

Dockerfile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,16 @@ RUN conda config --add channels conda-forge; sync && \
7171
RUN sed -i 's/\(backend *: \).*$/\1Agg/g' /usr/local/miniconda/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/matplotlib/mpl-data/matplotlibrc && \
7272
python -c "from matplotlib import font_manager"
7373

74+
# Install CI scripts
75+
COPY docker/files/run_* /usr/bin/
76+
RUN chmod +x /usr/bin/run_*
77+
78+
# Replace imglob with a Python3 compatible version
79+
COPY nipype/external/fsl_imglob.py /usr/bin/fsl_imglob.py
80+
RUN rm -rf ${FSLDIR}/bin/imglob && \
81+
chmod +x /usr/bin/fsl_imglob.py && \
82+
ln -s /usr/bin/fsl_imglob.py ${FSLDIR}/bin/imglob
83+
7484
# Installing dev requirements (packages that are not in pypi)
7585
WORKDIR /src/
7686
COPY requirements.txt requirements.txt
@@ -83,16 +93,6 @@ RUN cd /src/nipype && \
8393
pip install -e .[all] && \
8494
rm -rf ~/.cache/pip
8595

86-
# Install CI scripts
87-
COPY docker/files/run_* /usr/bin/
88-
RUN chmod +x /usr/bin/run_*
89-
90-
# Replace imglob with a Python3 compatible version
91-
COPY nipype/external/fsl_imglob.py /usr/bin/fsl_imglob.py
92-
RUN rm -rf ${FSLDIR}/bin/imglob && \
93-
chmod +x /usr/bin/fsl_imglob.py && \
94-
ln -s /usr/bin/fsl_imglob.py ${FSLDIR}/bin/imglob
95-
9696
WORKDIR /work/
9797

9898
ARG BUILD_DATE

circle.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,18 @@ dependencies:
1717
- "~/docker"
1818
- "~/examples"
1919
- "~/.apt-cache"
20+
- "~/bin"
2021

2122
pre:
2223
# Let CircleCI cache the apt archive
2324
- mkdir -p ~/.apt-cache/partial && sudo rm -rf /var/cache/apt/archives && sudo ln -s ~/.apt-cache /var/cache/apt/archives
2425
- sudo apt-get -y update && sudo apt-get install -y wget bzip2
2526
# Create work folder and force group permissions
2627
- mkdir -p $WORKDIR && sudo setfacl -d -m group:ubuntu:rwx $WORKDIR && sudo setfacl -m group:ubuntu:rwx $WORKDIR
27-
- mkdir -p $HOME/docker $HOME/examples $WORKDIR/pytest $WORKDIR/logs
28+
- mkdir -p $HOME/docker $HOME/examples $HOME/bin $WORKDIR/tests $WORKDIR/logs $WORKDIR/crashfiles ${CIRCLE_TEST_REPORTS}/tests/
2829
override:
29-
- if [[ -e $HOME/docker/cache.tar ]]; then docker load --input $HOME/docker/cache.tar; fi :
30+
- if [[ -e "$HOME/bin/codecov.io" ]]; then curl -so $HOME/bin/codecov https://codecov.io/bash && chmod 755 $HOME/bin/codecov; fi
31+
- if [[ -e "$HOME/docker/cache.tar" ]]; then docker load --input $HOME/docker/cache.tar; fi :
3032
timeout: 6000
3133
- docker images
3234
- docker pull nipype/base:latest
@@ -50,7 +52,7 @@ test:
5052
parallel: true
5153
post:
5254
# Place reports in the appropriate folder
53-
- mkdir -p ${CIRCLE_TEST_REPORTS}/tests/ && cp ${WORKDIR}/tests/*.xml ${CIRCLE_TEST_REPORTS}/tests/
55+
- cp ${WORKDIR}/tests/*.xml ${CIRCLE_TEST_REPORTS}/tests/
5456
# Send coverage data to codecov.io
5557
- bash .circle/codecov.sh
5658

docker/files/run_pytests.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ if [[ "${PYTHON_VERSION}" -ge "30" ]]; then
3737
exit_code=$(( $exit_code + $? ))
3838
fi
3939

40-
find /work -name "crash-*" -maxdepth 1 -exec mv {} ${WORKDIR}/crashfiles/ \;
40+
# Collect crashfiles
41+
find ${WORKDIR} -name "crash-*" -maxdepth 1 -exec mv {} ${WORKDIR}/crashfiles/ \;
4142

42-
# Just in case output xml files are misplaced,
43-
# then circle would not tell the tests failed otherwise
4443
exit ${exit_code}

0 commit comments

Comments
 (0)