Commit 7efb2aa4 authored by payno's avatar payno
Browse files

[ci] add automatic generation of documentation

parent 62505148
stages: stages:
- build
- test_library - test_library
- test_notbooks - test_notbooks
- deploy
variables: variables:
http_proxy: http://proxy.esrf.fr:3128 http_proxy: http://proxy.esrf.fr:3128
...@@ -9,7 +11,36 @@ variables: ...@@ -9,7 +11,36 @@ variables:
no_proxy: .esrf.fr,localhost no_proxy: .esrf.fr,localhost
ORANGE_WEB_LOG: 'False' ORANGE_WEB_LOG: 'False'
# build
doc:
stage: build
image: python:3.7-buster
tags:
- linux
before_script:
- arch
- which python
- python --version
- python -m pip install pip --upgrade
- python -m pip install setuptools --upgrade
- python -m pip install sphinx
- python -m pip install -r requirements.txt
- rm -rf artifacts
- mkdir artifacts
script:
- python setup.py build
- python setup.py build_sphinx
- mv build/sphinx/html artifacts/doc
artifacts:
paths:
- artifacts/doc/
when: on_success
expire_in: 2h
only:
- master
# test_library
.build_template: &test_linux_template .build_template: &test_linux_template
stage: test_library stage: test_library
before_script: before_script:
...@@ -37,6 +68,7 @@ test:python3.7_stretch_pyqt5: ...@@ -37,6 +68,7 @@ test:python3.7_stretch_pyqt5:
<<: *test_linux_template <<: *test_linux_template
# test_notbooks
test:test-tomoscan-tutorials: test:test-tomoscan-tutorials:
stage: test_notbooks stage: test_notbooks
image: docker-registry.esrf.fr/dau/tomwer:python3.7_buster_pyqt5 image: docker-registry.esrf.fr/dau/tomwer:python3.7_buster_pyqt5
...@@ -61,3 +93,23 @@ test:test-tomoscan-tutorials: ...@@ -61,3 +93,23 @@ test:test-tomoscan-tutorials:
script: script:
- jupyter nbconvert --to notebook --execute doc/tutorials/edf_scan.ipynb - jupyter nbconvert --to notebook --execute doc/tutorials/edf_scan.ipynb
- jupyter nbconvert --to notebook --execute doc/tutorials/hdf5_scan.ipynb - jupyter nbconvert --to notebook --execute doc/tutorials/hdf5_scan.ipynb
# deploy
pages:
stage: deploy
tags:
- linux
image: python:3.7-buster
script:
- rm -rf public
# doc
- mv artifacts/doc public
after_script:
- ls -Rl public
artifacts:
paths:
- public
expire_in: 1h
only:
- master
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment