Skip to content

Commit

Permalink
Add doc build to travis (#63)
Browse files Browse the repository at this point in the history
* add doc build check to travis (note: does NOT use `python setup.py build_sphinx` because of #61)
* update .travis.yml
* switch to 3.7 for deployment
  • Loading branch information
hmacdope authored Oct 6, 2020
1 parent 0289ef6 commit c8ec097
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,29 @@ branches:
only:
- master

matrix:
fast_finish: true
include:
- env: NAME="Docs"
MAIN_CMD="cd docs && make html"
PYTHON_VERSION=3.7


install:
- pip install --upgrade pytest
- pip install codecov pytest-cov
- pip install --upgrade numpy cython
- if [[ $TRAVIS_PYTHON_VERSION == "3.6" ]]; then pip install --upgrade sphinx sphinx-sitemap sphinx-rtd-theme; fi
- if [[ $TRAVIS_PYTHON_VERSION == "3.7" ]]; then pip install --upgrade sphinx sphinx-sitemap sphinx-rtd-theme; fi
- pip install -e .

script:
- pytest -v --cov pytng pytng tests

after_success:
- codecov
# only need to build docs on 3.6 version
# only need to build docs on 3.7 version
# touch .nojekyll else github-pages messes up theme
- if [[ $TRAVIS_PYTHON_VERSION == "3.6" ]]; then cd docs && make html && touch ./_build/html/.nojekyll && cd ../; fi
- if [[ $TRAVIS_PYTHON_VERSION == "3.7" ]]; then cd docs && make html && touch ./_build/html/.nojekyll && cd ../; fi

deploy:
# stuff related to deploying to gh-pages
Expand All @@ -34,7 +42,7 @@ deploy:
token: $GH_PAGES_TOKEN
on:
branch: master
python: "3.6"
python: "3.7"
local_dir: docs/_build/html
project_name: pytng
edge: true
edge: true

0 comments on commit c8ec097

Please sign in to comment.