-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
126 lines (109 loc) · 4.46 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
language: python
python: 3.5
matrix:
fast_finish: true
include:
- os: linux
dist: trusty
env: PY=3.5
sudo: required
- os: linux
dist: trusty
env: PY=2.7
sudo: required
branches:
only:
- master
- devel
- /^[0-9]+\.[0-9]+\.[0-9]+[.0-9ab]*$/
cache:
- pip: true
services:
- postgresql
addons:
apt:
packages:
- swig
- libzmq3-dev
- libgmp-dev
- libglpk-dev
- glpk-utils
- pandoc
- postgresql-contrib-9.6
- libeigen3-dev
before_install:
# OS X deps
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install swig; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install glpk; fi
# OS X Postgres
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PG_DATA=$(brew --prefix)/var/postgres; fi
# strange os x error https://dba.stackexchange.com/questions/75214/psql-could-not-connect-to-server-no-such-file-or-directory
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pg_ctl -w start -l postgres.log --pgdata ${PG_DATA}; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then createuser -s postgres; fi
# Conda OSX
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh; fi
# Conda Linux
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; fi
- bash miniconda.sh -b -p $HOME/conda
- export PATH="$HOME/conda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- conda create -q -n tenv python=$PY pip cmake
- source activate tenv
- pip install pip --upgrade
- pip install codecov
install:
- conda install -q -c rdkit boost rdkit=2016.09.4
- conda install -q -c openbabel openbabel
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then if [[ $PY == "2.7" ]]; then conda install pandas; fi; fi;
- pip install cython
- pip install flake8 numpy scipy pyzmq pandas pytest pytest-cov pytest-benchmark swiglpk optlang
- pip install .[test,docs]
before_script:
- python -c 'from rdkit import Chem'
- python -c 'import pybel'
- python -c 'from optlang import glpk_interface'
- python -c 'import cobra; print(cobra.__version__)'
- flake8 marsi
- psql -c 'create database "marsi-db";' -U postgres
- marsi db migrate
- python bin/restore_db.py
- psql -d marsi-db -c 'SELECT COUNT(*) FROM metabolites;' -U postgres
script:
- py.test -v -rsx --cov --cov-report=xml tests
after_success:
- head coverage.xml
- codecov
before_deploy:
- pip install twine jupyter
- python setup.py sdist
- cd docs && make apidoc && make examples && make html && touch _build/html/.nojekyll
- cd $TRAVIS_BUILD_DIR
deploy:
- provider: pages
skip_cleanup: true
local_dir: docs/_build/html
github_token: $GITHUB_TOKEN
target-branch: gh-pages
on:
branch: master
repo: biosustain/marsi
condition:
- $PY == 3.5
- $TRAVIS_OS_NAME == "linux"
- provider: pypi
user: Joo.Cardoso
password:
secure: BCMU/jPT2iQNmCI/hn7G2YymCB9r3q+sqbEI9cIoJXjfQcJmMX4h7eQmYvzDaDol+spD+v/j1ZrQ34eQR+4U8FakPUI2pY7wCYUidrl6020Cl7AMSktWEPnOBElXynlr6T5NUkyyE4gCjaPgvzy1GIAX3m7znlVmtQDx5+h2RqBOHVEBdZnF5AtW02eW+hZY9fgtS1nRvXZt1JUhs7w18ThIJbyW5CTb42zqxuBCwZvGu/l7pjxhuTMYQ3ecmahn4L6UNP6TJzdeKeMa02/T7sSmBrApPEzWGvulhz/hhljVrL+C4lQkV2MiYz1Km7fbJr+W56LY6v/rFeKGm9tJ359vsspve6ApY44ndkL/K5i17gJ1l/2e9LY/VnEQDtCdvEz3N1IoybXTnrhJpVeq7IgRecQINvamO2zPoe94/Tv76OUpmxlklnH66qA+vVRC9+cxIFSUtB3e8sOOALli13oQtZuJGFmriK6kgBFWfGBS1132zUr6Wu3aR0QBgzFK4ZoiI1Swkvb5JhLg7a08An6xl6cU2/APvJkQyWPxIaTqbJmHajhsCqvyebf4Oq2pbtOO9xWI6OvO01EirpAkMIco8WBjx8vZlWXGwm4KTrEnw8QtwXCRGkpcGabI+PaoOD/BIixsI05s8NT7BmpTuw4s74EjTMnVnSWX+MFVjeQ=
distributions: sdist
skip_cleanup: true
on:
branch: master
tags: true
repo: biosustain/marsi
env:
global:
secure: mncUZPqT3TyNE5JMGsvR+PTQhZbO2edZP3lONn4dHGh+3nsoge5XrLwTn+wakkXhutYsokgtT7KboU0dFJXCza8bR/H/jxZfCqbDxO9z5zexK/18xxQ8tZ41ogVdViiJu5kH4LkyzyUlf07bGAaP7DlDXXWAr5Dta7+v8ecnJCqdAfKLrQJ+6jqpQSM7Gr2x49cHVqSfL5CPWvIHYGEbg7MnDcwZpE9TSt/vgXyFZ9VSQXN6U+o+2YpPtWK7WSoru5vdHev3QKylvEAeqZImvflwbxJBE2RTiglgcKrOIYPYXZeb8EjHG8FoNCibKlkrt9O2mTbb5mfMjdu1JcNmZBUTLH+6MT4LCEJxM7BLXms7SfXVnI8PcVH5W2faaJkM+pE/1mwzqOTrVkXwwU/FpV+F8QoZYt1WvmNDqZx3jrshcAk1ExgvqB2DGuHZchJziHfIfPSZvwAXCKNFiC8Xd8KOX/a4p4wQPomL0C9Cxclna6k9J+nFFdwvsuAPDw5b+29uTiPVDtPQgHHdB61HlcbCJo/vfE8+JAk0T2jC3ghIwKrnNra9kM0JTw9E6rV1qJvpyOB9HDa01rd6dvv/NRLhcn+/sgI6SAHAGq1an69uG0FvTzD1cpbkIPw5s97rxkh1jqkTbsSpx61HJDRUybGkYvbp+FdIhjlAAoQkkgo=