forked from openforcefield/openff-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
110 lines (90 loc) · 2.98 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
# Run jobs on container-based infrastructure, can be overridden per job
# Run builds for both master and feature releases
language: python
branches:
only:
- master
# Regex for feature release branches
- "maintenance/.+"
matrix:
include:
# Test osx with RDKit
- os: osx
language: generic
env: PYTHON_VER=3.6 RDKIT=true
- os: osx
language: generic
env: PYTHON_VER=3.7 RDKIT=true
# Test Linux RDKit compatibility
- os: linux
python: 3.6
env: PYTHON_VER=3.6 RDKIT=true
- os: linux
python: 3.7
env: PYTHON_VER=3.7 RDKIT=true
# Test Linux OpenEye compatibility
- os: linux
python: 3.6
env: PYTHON_VER=3.6 OPENEYE=true
- os: linux
python: 3.7
env: PYTHON_VER=3.7 OPENEYE=true
# Test case where both OpenEye and RDKit are installed
- os: linux
python: 3.6
env: PYTHON_VER=3.6 OPENEYE=true RDKIT=true
- os: linux
sudo: required
python: 3.7
env: PYTHON_VER=3.7 OPENEYE=true RDKIT=true
env:
global:
- OE_LICENSE="$HOME/oe_license.txt"
before_install:
# Additional info about the build
- uname -a
- df -h
- ulimit -a
# Install conda and some package management tools
- source devtools/travis-ci/before_install.sh
- python -V
# Unpack encrypted OpenEye license file
- if [ "$TRAVIS_SECURE_ENV_VARS" == true ]; then openssl aes-256-cbc -K $encrypted_4ea8671dd0e3_key
-iv $encrypted_4ea8671dd0e3_iv -in oe_license.txt.enc -out $OE_LICENSE -d; fi
- if [[ "$OPENEYE" == true && "$TRAVIS_SECURE_ENV_VARS" == false ]]; then echo "OpenEye
license will not be installed in forks."; fi
install:
# Install the Python environment
- python devtools/scripts/create_conda_env.py -n=test -p=$PYTHON_VER devtools/conda-envs/test_env.yaml
- conda activate test
# Install RDKit
- if [[ "$RDKIT" == true ]]; then conda install --yes -c rdkit rdkit; fi
- if [[ "$RDKIT" == true ]]; then conda install --yes -c omnia ambermini; fi
# Install OpenEye
- if [[ "$OPENEYE" == true ]]; then conda install -c openeye openeye-toolkits; fi
# Build and install package
- python setup.py develop --no-deps
# Install force field repositories
- conda install --yes -c omnia smirnoff99Frosst
- conda install --yes -c omnia/label/dev openforcefields
script:
# Run doctests only if both RDKit and OpenEye are installed.
# examples/check_dataset_parameter_coverage REQURIES rdkit, so skip if it's not available
- if [[ "$RDKIT" == true && "$OPENEYE" == true ]];
then
pytest --ignore=utilities --ignore=examples/deprecated --ignore=docs
--ignore=devtools --doctest-modules --nbval-lax --cov=openforcefield
--cov-config=setup.cfg;
elif [[ "$OPENEYE" == true ]];
then
pytest --ignore=utilities --ignore=examples/deprecated --ignore=docs
--ignore=devtools --ignore=examples/check_dataset_parameter_coverage
--nbval-lax --cov=openforcefield --cov-config=setup.cfg;
else
pytest --ignore=utilities --ignore=examples/deprecated
--nbval-lax --cov=openforcefield --cov-config=setup.cfg;
fi
notifications:
email: false
after_success:
- codecov