/
.travis.yml
43 lines (39 loc) · 1.3 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
dist: xenial
language: python
sudo: false
matrix:
fast_finish: true
include:
- python: 3.6
- python: 3.7
- python: 3.8
env: PUBLISH_DOCS=1
cache:
directories:
- $HOME/.cache/pip
- $HOME/.cache/matplotlib
- $HOME/pools/
env:
global:
# Doctr deploy key for danielballan.github.io/photomosaic
- secure: "MwJTOzI4b4AU/bkkYArBw7CSlJVx61eKqaWulttBjvJFkpqQ+c2o1/EWSskTX2SCq8ZpexwnxDxcUIDYkfZsQhWsVlkzBLrJGSRfoVQV7ndRfqRDEgiOrQpLZgKsG6CbG8zcYBP39K2HUaP7HcDQgTTuKkLwcbpc3uBx14SqvvU="
install:
# Install this package and the packages listed in requirements.txt.
- pip install .[parallel]
# Install extra requirements for running tests and building docs.
- pip install -r requirements-dev.txt
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.
- flake8 # Enforce code style.
- set -e
- make -C doc pools # Generate tile pools used in documentation.
- make -C doc images # Generate example images used in documentation.
- make -C doc html # Build the documentation.
- |
if [ $PUBLISH_DOCS ]; then
# Pubish the documentation to GitHub Pages.
pip install doctr;
doctr deploy docs --built-docs doc/build/html;
fi