-
Notifications
You must be signed in to change notification settings - Fork 37
/
.travis.yml
48 lines (43 loc) · 1.24 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
40
41
42
43
44
45
46
47
48
# specify language and version
# https://docs.travis-ci.com/user/languages/python/
language: python
python:
- "3.6"
# which branches to run CI on
# https://docs.travis-ci.com/user/customizing-the-build/#building-specific-branches
branches:
only:
- master
- test_ci
# command to install dependencies
install:
- pip install .
# set up the display port to generate figures
# https://docs.travis-ci.com/user/gui-and-headless-browsers/#using-xvfb-directly
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
# command to test examples and then run tests
script:
# test examples
- pytest examples/
# run tests
- pytest --cov=mypack tests/
# use sphinx to build docs
- cd docs/
- make html
# tell GitHub not to use jekyll
- touch build/html/.nojekyll
# Tell Travis CI to copy the documentation to the gh-pages branch of
# your GitHub repository.
# https://amarder.github.io/using-travis-ci-to-build-sphinx-docs/
# Set GitHub token: https://docs.travis-ci.com/user/deployment/pages/#setting-the-github-token
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
keep-history: true
on:
branch: master
local_dir: docs/build/html/