-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP,TEST,DOC] Builds docs in CircleCI (#428)
* [REF] Fix up dev vs non-dev requirements.txt * [TEST] Build docs in CircleCI Also modifies the building of the py37 environment a bit since it's shared between so many things
- Loading branch information
Showing
3 changed files
with
66 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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: | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters