Skip to content

Commit ef58569

Browse files
committed
fix(tests): ordering of tests, replace ///templateflow with github repo
1 parent 92936a7 commit ef58569

File tree

1 file changed

+27
-26
lines changed

1 file changed

+27
-26
lines changed

.circleci/config.yml

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -56,26 +56,26 @@ jobs:
5656
- "/tmp/cache"
5757

5858
- run:
59-
name: Run tests (config, parameterized TEMPLATEFLOW_USE_DATALAD)
60-
command: |
61-
pyenv global 3.5.2
62-
virtualenv venv
63-
pytest --junit-xml=/tmp/tests/conftests.xml --cov templateflow --cov-report xml:/tmp/cov_config.xml \
64-
/tmp/src/templateflow/templateflow/conf/tests/test_conf.py
65-
66-
- run:
67-
name: Submit config test coverage
59+
name: Update TemplateFlow skeleton
6860
command: |
69-
codecov --file /tmp/cov_config.xml --root /tmp/src/templateflow \
70-
--flags config -e CIRCLE_JOB
61+
datalad install -r -s https://github.com/templateflow/templateflow $HOME/.cache/templateflow
62+
cd $HOME/.cache/templateflow/
63+
find . -type d -not -path "*/\.*" -exec mkdir -p /tmp/skel/{} \;
64+
for i in $( find . -type f -not -path "*/\.*" ); do cp $i /tmp/skel/${i:2}; done
65+
find . -type l -not -path "*/\.*" -exec touch /tmp/skel/{} \;
66+
cd /tmp/skel
67+
mkdir -p /tmp/resources
68+
zip -r /tmp/resources/templateflow-skel.zip */
7169
70+
- store_artifacts:
71+
path: /tmp/resources/templateflow-skel.zip
72+
7273
- run:
7374
name: Run tests (w/ DataLad)
7475
command: |
7576
pyenv global 3.5.2
7677
virtualenv venv
7778
export TEMPLATEFLOW_USE_DATALAD=on
78-
export TEMPLATEFLOW_HOME=$HOME/templateflow
7979
pytest --junit-xml=/tmp/tests/datalad.xml --cov templateflow --cov-report xml:/tmp/cov_api_dl.xml \
8080
--doctest-modules /tmp/src/templateflow/templateflow/api.py
8181
@@ -85,19 +85,6 @@ jobs:
8585
codecov --file /tmp/cov_api_dl.xml --root /tmp/src/templateflow \
8686
--flags api,datalad -e CIRCLE_JOB
8787
88-
- run:
89-
name: Update TemplateFlow skeleton
90-
command: |
91-
cd $HOME/.cache/templateflow/
92-
find . -type d -not -path "*/\.*" -exec mkdir -p /tmp/skel/{} \;
93-
for i in $( find . -type f -not -path "*/\.*" ); do cp $i /tmp/skel/${i:2}; done
94-
find . -type l -not -path "*/\.*" -exec touch /tmp/skel/{} \;
95-
cd /tmp/skel
96-
mkdir -p /tmp/resources
97-
zip -r /tmp/resources/templateflow-skel.zip */
98-
99-
- store_artifacts:
100-
path: /tmp/resources/templateflow-skel.zip
10188
10289
- run:
10390
name: Run tests (pre-cached full TemplateFlow / no downloads)
@@ -140,7 +127,7 @@ jobs:
140127
virtualenv venv
141128
export TEMPLATEFLOW_USE_DATALAD=off
142129
export TEMPLATEFLOW_HOME=$HOME/templateflow-clean
143-
mkdir -p $TEMPLATEFLOW_HOME; pushd $TEMPLATEFLOW_HOME; datalad install -r -s ///templateflow $TEMPLATEFLOW_HOME; popd
130+
datalad install -r -s https://github.com/templateflow/templateflow $TEMPLATEFLOW_HOME
144131
pytest --junit-xml=/tmp/tests/dl+s3.xml --cov templateflow --cov-report xml:/tmp/cov_api_dl_s3.xml \
145132
--doctest-modules /tmp/src/templateflow/templateflow/api.py
146133
@@ -150,6 +137,20 @@ jobs:
150137
codecov --file /tmp/cov_api_dl_s3.xml --root /tmp/src/templateflow \
151138
--flags api,dls3 -e CIRCLE_JOB
152139
140+
- run:
141+
name: Run tests (config, parameterized TEMPLATEFLOW_USE_DATALAD)
142+
command: |
143+
pyenv global 3.5.2
144+
virtualenv venv
145+
pytest --junit-xml=/tmp/tests/conftests.xml --cov templateflow --cov-report xml:/tmp/cov_config.xml \
146+
/tmp/src/templateflow/templateflow/conf/tests/test_conf.py
147+
148+
- run:
149+
name: Submit config test coverage
150+
command: |
151+
codecov --file /tmp/cov_config.xml --root /tmp/src/templateflow \
152+
--flags config -e CIRCLE_JOB
153+
153154
- store_test_results:
154155
path: /tmp/tests
155156

0 commit comments

Comments
 (0)