-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
39 lines (36 loc) · 1.65 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
language: python
install:
- sudo apt-get update
# Install the dependencies and the package:
- pip install -r requirements.txt
- python setup.py install
# Now get set up to run jupyter notebooks:
- sudo apt-get install texlive-latex-recommended
- sudo apt-get install texlive-latex-extra
- sudo apt-get install texlive-fonts-recommended
- sudo apt-get install chktex
- sudo apt-get install dvipng
- pip install --upgrade jupyter
- pip install nbconvert
# Finally get set up to build the docs
- pip install sphinx
- pip install sphinx_rtd_theme
script:
# Run the unit tests:
# - nosetests
# Run the demo notebook, to make demo.html:
- jupyter nbconvert --ExecutePreprocessor.kernel_name=python --ExecutePreprocessor.timeout=600 --to html --execute docs/notebooks/demo.ipynb ; cp docs/notebooks/demo.html .
- jupyter nbconvert --ExecutePreprocessor.kernel_name=python --ExecutePreprocessor.timeout=600 --to html --execute docs/notebooks/kld.ipynb ; cp docs/notebooks/kld.html .
# Build the docs, the same way readthedocs does it:
- cd docs ; sphinx-build -b html . _build/html ; cd -
# Finally, if it's the master branch being updated, force-push the
# notebook html pages to an otherwise empty "html" branch:
# if [ -n "$GITHUB_API_KEY" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then
after_success: |
if [ -n "$GITHUB_API_KEY" ]; then
git checkout --orphan html
git rm -rf .
git add -f demo.html kld.html
git -c user.name='travis' -c user.email='travis' commit -m init
git push -q -f https://drphilmarshall:[email protected]/aimalz/qp html
fi