-
Notifications
You must be signed in to change notification settings - Fork 17
/
.travis.yml
57 lines (52 loc) · 1.17 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
# define global environment variables
env:
global:
-DEPLOY_DOCS=false
-DEPLOY_PYPI=false
matrix:
include:
- os: linux
dist: trusty
python: 3.5
env:
- DEPLOY_DOCS=true
- DEPLOY_PYPI=true
- os: linux
dist: bionic
python: 3.7
- os: osx
osx_image: xcode10.2
language: generic
install:
- python3 -m pip install Cython numpy scipy pytest git+https://github.com/lmoresi/pdoc.git
- python3 -m pip install -e .
script:
# run the tests
- pytest tests/
# generate the release
- python3 setup.py sdist
# generate the docs
- mkdir docs
- cd docs
- pdoc --html -o . --force pycurious
- mv pycurious/*.html .
- rm -rf pycurious/
- cd ../
deploy:
- provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
keep_history: true
on:
branch: master
condition: '$DEPLOY_DOCS == "true"'
verbose: true
local_dir: docs/
- provider: pypi
user: $PYPI_USERNAME
password: $PYPI_PASSWORD
on:
tags: true
condition: '$DEPLOY_PYPI == true'
skip_cleanup: true