@@ -219,14 +219,15 @@ jobs:
219219 mkdir -p $PWD/artifacts $PWD/summaries
220220 sudo setfacl -d -m group:ubuntu:rwx $PWD
221221 sudo setfacl -m group:ubuntu:rwx $PWD
222- docker run -u $( id -u ) -it --rm=false \
222+ docker run -u $( id -u ) -it --rm=false -w /src/niworkflows \
223+ -e COVERAGE_FILE=/tmp/summaries/.pytest.coverage \
223224 -e TEST_DATA_HOME=/data -v /tmp/data:/data \
224225 -v ${PWD}:/tmp niworkflows:py3 \
225226 pytest --junit-xml=/tmp/summaries/pytest.xml \
226227 --cov niworkflows --cov-report xml:/tmp/summaries/unittests.xml \
227- --ignore=/src/niworkflows/ niworkflows/tests/ \
228- --ignore=/src/niworkflows/ niworkflows/func/tests/ \
229- /src/ niworkflows/niworkflows
228+ --ignore=niworkflows/tests/ \
229+ --ignore=niworkflows/func/tests/ \
230+ niworkflows/
230231
231232 - run :
232233 name : Submit unit test coverage
@@ -239,14 +240,15 @@ jobs:
239240 name : Run reportlet tests
240241 no_output_timeout : 2h
241242 command : |
242- docker run -u $( id -u ) -it --rm=false \
243+ docker run -u $( id -u ) -it --rm=false -w /src/niworkflows \
244+ -e COVERAGE_FILE=/tmp/summaries/.reportlets.coverage \
243245 -e SAVE_CIRCLE_ARTIFACTS="/tmp/artifacts/" \
244246 -e TEST_DATA_HOME=/data -v /tmp/data:/data \
245247 -v /tmp/fslicense/license.txt:/opt/freesurfer/license.txt:ro \
246248 -v ${PWD}:/tmp niworkflows:py3 \
247249 pytest -n auto --junit-xml=/tmp/summaries/reportlets.xml \
248250 --cov niworkflows --cov-report xml:/tmp/summaries/reportlets.xml \
249- /src/niworkflows/ niworkflows/tests/
251+ niworkflows/tests/
250252 - run :
251253 name : Submit reportlet test coverage
252254 command : |
@@ -309,15 +311,16 @@ jobs:
309311 no_output_timeout : 2h
310312 command : |
311313 mkdir -p /tmp/masks/reports && \
312- docker run -ti --rm=false \
314+ docker run -ti --rm=false -w /src/niworkflows \
315+ -e COVERAGE_FILE=/tmp/masks/.coverage \
313316 -v /tmp/data:/tmp/data -v /tmp/masks:/tmp/masks \
314317 -e FMRIPREP_REGRESSION_SOURCE=/tmp/data/fmriprep_bold_truncated \
315318 -e FMRIPREP_REGRESSION_TARGETS=/tmp/data/fmriprep_bold_mask \
316319 -e FMRIPREP_REGRESSION_REPORTS=/tmp/masks/reports \
317320 niworkflows:py3 \
318321 pytest --junit-xml=/tmp/masks/regression.xml \
319322 --cov niworkflows --cov-report xml:/tmp/masks/coverage.xml \
320- /src/niworkflows/ niworkflows/func/tests/
323+ niworkflows/func/tests/
321324
322325 - run :
323326 name : Submit masks test coverage
@@ -424,6 +427,24 @@ jobs:
424427 command : make -C docs SPHINXOPTS="-W" BUILDDIR="_build/no_version_html" html
425428 - store_artifacts :
426429 path : ./docs/_build/no_version_html
430+ - run :
431+ name : Install niworkflows
432+ command : |
433+ pip install --no-cache-dir codecov
434+ pip install --no-cache-dir -e .[all]
435+ - run :
436+ name : Build only this commit with coverage collection
437+ command : |
438+ make -C docs/ clean
439+ export COVERAGE_FILE=/tmp/.coverage
440+ coverage run --source=niworkflows $( which sphinx-build ) \
441+ -b html -W -d docs/_build/no_version_doctrees ./docs/ docs/_build/no_version_html
442+ coverage xml -o /tmp/documentation.xml
443+ python -m codecov --file /tmp/documentation.xml --flags documentation -e CIRCLE_JOB
444+ - run :
445+ name : Uninstall NiWorkflows
446+ command : |
447+ pip uninstall -y niworkflows
427448 - run :
428449 name : Generate Versioned Docs
429450 command : |
@@ -434,6 +455,7 @@ jobs:
434455 echo "Not a tag or master branch - skipping versioned docs."
435456 circleci step halt
436457 else
458+ make -C docs/ clean
437459 make -f ./docs/Makefile versioned CURBRANCH=${CIRCLE_TAG:-$CIRCLE_BRANCH}
438460 fi
439461 - save_cache :
0 commit comments