forked from ICB-DCM/pyPESTO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
85 lines (76 loc) · 2.03 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
language: python
python:
- "3.8"
os:
- linux
dist:
- bionic
compiler:
- gcc
# install dependencies
addons:
apt:
update: true
packages:
- build-essential
- coinor-libipopt1v5
- coinor-libipopt-dev
- gfortran
- lcov
- libatlas-base-dev
- libhdf5-serial-dev
- pandoc
- pkg-config
- python-dev
- swig3.0
- zlib1g-dev
install:
- mkdir -p ~/bin/ && ln -s /usr/bin/swig3.0 ~/bin/swig && export PATH=~/bin/:$PATH
- pip3 install -r ./.travis_pip_reqs.txt
- pip3 install .[ipopt,dlib,pyswarm,pymc3]
- pip3 install https://github.com/petab-dev/petab/archive/develop.zip
- pip3 install -e
git+https://github.com/icb-dcm/amici.git@develop#egg=amici\&subdirectory=python/sdist
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
git clone --depth 1
https://github.com/petab-dev/petab_test_suite tmp/petab_test_suite;
pip3 install -e tmp/petab_test_suite;
fi
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
pip install -r .rtd_pip_reqs.txt;
fi
# run tests
script:
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
./run_flake8.sh;
fi
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
travis_wait 20 python3 -m pytest --cov=pypesto ./test/test_*;
fi
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
travis_wait 20 xvfb-run -a python3 -m pytest
--cov=pypesto --cov-append ./test/visualize/test_*;
fi
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
sphinx-build -W -b html -d doc/_build/html doc/ doc/_build/html;
fi
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
test/run_notebook.sh doc/example/;
fi
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
coverage xml;
fi
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
./test/check_git_size.sh;
fi
after_success:
- bash <(curl -s https://codecov.io/bash)
deploy:
provider: pypi
username: $TWINE_USERNAME
password: $TWINE_PASSWORD
on:
tags: true
skip_existing: true
# cache dependencies
cache: pip