Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP,TEST,DOC] Builds docs in CircleCI #428

Merged
merged 2 commits into from
Nov 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 62 additions & 40 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,27 @@ orbs:
codecov: codecov/[email protected]
jobs:

makeenv_37:
docker:
- image: continuumio/miniconda3
working_directory: /tmp/src/tedana
steps:
- checkout
- restore_cache:
key: conda-py37-v1-{{ checksum "dev_requirements.txt" }}
- run:
name: Generate environment
command: |
if [ ! -d /opt/conda/envs/tedana_py37 ]; then
conda create -yq -n tedana_py37 python=3.7
source activate tedana_py37
pip install -r dev_requirements.txt
fi
- save_cache:
key: conda-py37-v1-{{ checksum "dev_requirements.txt" }}
paths:
- /opt/conda/envs/tedana_py37

unittest_35:
docker:
- image: continuumio/miniconda3
Expand All @@ -18,7 +39,7 @@ jobs:
- run:
name: Generate environment
command: |
apt-get install -y make
apt-get install -yqq make
if [ ! -d /opt/conda/envs/tedana_py35 ]; then
conda create -yq -n tedana_py35 python=3.5
source activate tedana_py35
Expand Down Expand Up @@ -51,7 +72,7 @@ jobs:
- run:
name: Generate environment
command: |
apt-get install -y make
apt-get install -yqq make
if [ ! -d /opt/conda/envs/tedana_py36 ]; then
conda create -yq -n tedana_py36 python=3.6
source activate tedana_py36
Expand Down Expand Up @@ -81,26 +102,14 @@ jobs:
- checkout
- restore_cache:
key: conda-py37-v1-{{ checksum "dev_requirements.txt" }}
- run:
name: Generate environment
command: |
apt-get install -y make
if [ ! -d /opt/conda/envs/tedana_py37 ]; then
conda create -yq -n tedana_py37 python=3.7
source activate tedana_py37
pip install -r dev_requirements.txt
fi
- run:
name: Running unit tests
command: |
source activate tedana_py37
apt-get install -y make
source activate tedana_py37 # depends on makeenv_37
make unittest
mkdir /tmp/src/coverage
mv /tmp/src/tedana/.coverage /tmp/src/coverage/.coverage.py37
- save_cache:
key: conda-py37-v1-{{ checksum "dev_requirements.txt" }}
paths:
- /opt/conda/envs/tedana_py37
- persist_to_workspace:
root: /tmp
paths:
Expand All @@ -114,22 +123,14 @@ jobs:
- checkout
- restore_cache:
key: conda-py37-v1-{{ checksum "dev_requirements.txt" }}
- run:
name: Generate environment
command: |
apt-get install -y make
if [ ! -d /opt/conda/envs/tedana_py37 ]; then
conda create -yq -n tedana_py37 python=3.6
source activate tedana_py37
pip install -r dev_requirements.txt
fi
- run:
name: Style check
command: |
source activate tedana_py37
apt-get install -yqq make
source activate tedana_py37 # depends on makeenv37
make lint

integration:
build_docs:
docker:
- image: continuumio/miniconda3
working_directory: /tmp/src/tedana
Expand All @@ -138,19 +139,30 @@ jobs:
- restore_cache:
key: conda-py37-v1-{{ checksum "dev_requirements.txt" }}
- run:
name: Generate environment
name: Build docs
command: |
apt-get install -y make
if [ ! -d /opt/conda/envs/tedana_py37 ]; then
conda create -yq -n tedana_py37 python=3.6
source activate tedana_py37
pip install -r dev_requirements.txt
fi
apt-get install -yqq make
source activate tedana_py37 # depends on makeenv37
cd docs && make html doctest
mkdir /tmp/docs
mv /tmp/src/tedana/docs/_build/* /tmp/docs/
- store_artifacts:
path: /tmp/docs

integration:
docker:
- image: continuumio/miniconda3
working_directory: /tmp/src/tedana
steps:
- checkout
- restore_cache:
key: conda-py37-v1-{{ checksum "dev_requirements.txt" }}
- run:
name: Run integration tests
no_output_timeout: 40m
command: |
source activate tedana_py37
apt-get install -yqq make
source activate tedana_py37 # depends on makeenv_37
make integration
mkdir /tmp/src/coverage
mv /tmp/src/tedana/.coverage /tmp/src/coverage/.coverage.integration
Expand All @@ -174,8 +186,8 @@ jobs:
- run:
name: Merge coverage files
command: |
apt-get install -y curl
source activate tedana_py37
apt-get install -yqq curl
source activate tedana_py37 # depends on makeenv37
cd /tmp/src/coverage/
coverage combine
coverage xml
Expand All @@ -188,11 +200,21 @@ workflows:
version: 2.1
build_test:
jobs:
- makeenv_37
- unittest_35
- unittest_36
- unittest_37
- style_check
- integration
- unittest_37:
requires:
- makeenv_37
- style_check:
requires:
- makeenv_37
- integration:
requires:
- makeenv_37
- build_docs:
requires:
- makeenv_37
- merge_coverage:
requires:
- unittest_35
Expand Down
4 changes: 4 additions & 0 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
-r requirements.txt
sphinx
sphinx-argparse
sphinx_rtd_theme
coverage
flake8>=3.7
numpydoc
pytest
pytest-cov
requests
4 changes: 0 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ matplotlib
nibabel>=2.1.0
nilearn
numpy>=1.14
numpydoc
pandas
requests
scikit-learn
scipy
sphinx-argparse
versioneer