Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
Test documentation (dev setup) on CI
Browse files Browse the repository at this point in the history
CI currently only tests that documentation can be built after all notebooks are
run and converted from .md to .ipynb format. Running all notebooks takes some
time. This CI step makes sure, that the documentation can also be built without
converting the notebooks first.
  • Loading branch information
leezu committed Nov 23, 2018
1 parent cce82a7 commit 9993143
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
11 changes: 9 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,24 @@ stage("Unit Test") {
ws('workspace/gluon-nlp-docs') {
checkout scm
if (env.BRANCH_NAME.startsWith("PR-")) {
sh("ci/step_documentation.sh false")
sh("ci/step_documentation.sh false false")
bucket = 'gluon-nlp-staging'
path = env.BRANCH_NAME+'/'+env.BUILD_NUMBER
} else {
sh("ci/step_documentation.sh true")
sh("ci/step_documentation.sh false true")
bucket = 'gluon-nlp'
path = env.BRANCH_NAME
}
sh("ci/upload_doc.sh ${bucket} ${path}")
}
}
},
// Make sure documentation can be built without building notebooks
'Documentation (dev setup)': {
node {
sh("ci/step_documentation.sh true false")
}
}
}
}

Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ lint:
make pylint
make restruc

dev_docs:
make -C docs html

docs: release
make -C docs doctest html SPHINXOPTS=-W
for f in $(shell find docs/examples -type f -name '*.md' -print) ; do \
Expand Down
9 changes: 7 additions & 2 deletions ci/step_documentation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ source ci/prepare_clean_env.sh doc
ci/install_dep.sh
export CUDA_VISIBLE_DEVICES=$EXECUTOR_NUMBER
make clean_doc
make docs
dev=$1
if [[ $dev == true ]]; then
make dev_docs
else
make docs
fi;

enforce_linkcheck=$1
enforce_linkcheck=$2
if [[ $enforce_linkcheck == true ]]; then
make -C docs linkcheck SPHINXOPTS=-W
else
Expand Down

0 comments on commit 9993143

Please sign in to comment.