-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy path.travis.yml
77 lines (67 loc) · 2.15 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
# Inspired by :
# https://github.com/astropy/ci-helpers/blob/master/.travis.yml
# And:
# https://github.com/Becksteinlab/GromacsWrapper/blob/master/.travis.yml
language: generic
os:
- linux
git:
depth: false
branches:
except:
- experimental
env:
global:
- TRAVIS_PYTHON_VERSION="3.8"
- GROMACS_VERSION="2018.5"
jobs:
include:
- os: linux
env: GROMACS_VERSION="2020"
- os: linux
env: TRAVIS_PYTHON_VERSION="3.6"
# - os: osx
# Remove because of the new travis plan (pay for osx)
before_install:
# Conda install
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
install:
#Create conda env:
- sed "s/python=3.7/python=$TRAVIS_PYTHON_VERSION/" .conda.yml > .tmp_conda.yml
# Cannot use -i option with osx
- sed "s/gromacs=2019.1/gromacs=$GROMACS_VERSION/" .tmp_conda.yml > .tmp_conda_2.yml
# Remove gromacs_py from pip dependencies
- sed "/- gromacs_py/d" .tmp_conda_2.yml > .tmp_conda_3.yml
- conda env create -f .tmp_conda_3.yml
- source activate gromacs_py
# Install gromacs_py
- pip install -r requirements_dev.txt
- pip install pytest codecov pytest-cov
# Install pdb2pqr
# - cd ..
# - git clone https://github.com/Electrostatics/apbs-pdb2pqr.git --branch master --depth=1
# - cd apbs-pdb2pqr/pdb2pqr/
# - python2 scons/scons.py install
# - export PATH="${HOME}/pdb2pqr/:$PATH"
script:
- cd ${TRAVIS_BUILD_DIR}
# Test gromacs_py
# Need to add --ignore to avoid weird error, see: https://github.com/pytest-dev/pytest/issues/4782
- pytest --ignore ci-helpers --cov-report=xml --cov=gromacs_py
# Build Doc: seems to be useless
# - make docs-no-browser
after_success:
# Launch pytest for codecov
- cd ${TRAVIS_BUILD_DIR}
- codecov