-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
57 lines (52 loc) · 1.75 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
49
50
51
52
53
54
55
56
57
language: python
python:
- 3.7
cache:
directories:
- $HOME/.cache/pip
- $HOME/.ccache # https://github.com/travis-ci/travis-ci/issues/5853
env:
global:
- secure: $doct_secure
- CODECOV_TOKEN: $CODECOV
install:
# The versions of pip and numpy that come pre-installed are often too old and
# can cause problems. Upgrade them.
#- pip install --upgrade pip numpy
# Install this package and the packages listed in requirements.txt.
- pip install -U pip
- pip install -U setuptools
- pip install coveralls
- pip install pytest-cov # to get coverage report
- pip install .
# Install extra requirements for running tests and building docs.
- pip install -r requirements-dev.txt
- sudo apt-get install pandoc
script:
- coverage run -m pytest # Run the tests and check for test coverage.
- coverage report -m # Generate test coverage report.
- codecov # Upload the report to codecov.
- set -e # If any of the following steps fail, just stop at that point
- rm -rf docs/build/html
- make -C docs html # Build the documentation.
#- make -C docs html # Build documentation.
#- pip install doctr
#- doctr deploy --built-docs docs/build/html . # Publish the documentation doesnt work
after_success:
#- coveralls
deploy:
# Use github pages to deploy process
provider: pages
# Keep pages that were built
skip_cleanup: true
# Directory where the html files are generated
local_dir: docs/build/html
# Github security/auth token
github-token: $GITHUB_TOKEN
# Incremental commit to keep old build/files from previous deployments
keep-history: false
# Git branch on which it should deploy (master, gh-pages)
target_branch: gh-pages
on:
# which branch on commit/push will trigger deployment
branch: master