-
Notifications
You must be signed in to change notification settings - Fork 30
122 lines (112 loc) · 4.07 KB
/
CI.yaml
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
name: CI
on:
pull_request:
schedule:
# nightly tests
- cron: '0 0 * * *'
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
cfg:
- {python-version: 3.6, openmm: "latest"}
- {python-version: 3.7, openmm: "latest"}
- {python-version: 3.7, openmm: "beta"}
- {python-version: 3.7, openmm: "rc"}
- {python-version: 3.7, openmm: "nightly"}
- {python-version: 3.7, openmm: "conda-forge"}
env:
ORGNAME: omnia
PACKAGENAME: openmoltools
OE_LICENSE: $HOME/oe_license.txt
CI_OS: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a
- name: Configure conda
shell: bash
run: |
. devtools/github-actions/initialize_conda.sh
conda activate
conda config --set always_yes True
conda config --add channels conda-forge
conda config --add channels omnia
conda config --add channels openeye
conda update --quiet --all
conda install --quiet conda conda-build jinja2 anaconda-client
conda info
conda list
- name: Decrypt OpenEye license
shell: bash
env:
ENC_OE_LICENSE: ${{ secrets.ENC_OE_LICENSE }}
run: |
echo "${ENC_OE_LICENSE}" > $HOME/oe_license.txt
- name: Create environment for package
shell: bash
run: |
. devtools/github-actions/initialize_conda.sh
conda activate
conda info
python devtools/scripts/create_conda_env.py -n=test -p=$PYVER devtools/conda-envs/test_env.yaml
- name: Install package
shell: bash
run: |
. devtools/github-actions/initialize_conda.sh
conda activate test
python -m pip install . --no-deps
conda list --show-channel-urls
- name: Prepare test environment
shell: bash
run: |
. devtools/github-actions/initialize_conda.sh
conda activate test
case ${{ matrix.cfg.openmm }} in
latest)
echo "Using latest release OpenMM."
conda install --quiet -c omnia openmm;;
beta)
echo "Using OpenMM beta"
conda install --quiet -c omnia/label/beta openmm;;
beta)
echo "Using OpenMM rc"
conda install --quiet -c omnia/label/rc openmm;;
nightly)
echo "Using OpenMM nightly dev build."
# need to install parmed from master until new release
pip install git+https://github.com/ParmEd/ParmEd.git
conda install --quiet -c omnia-dev openmm;;
conda-forge)
echo "Using OpenMM conda-forge testing build."
conda install --quiet -c conda-forge/label/testing openmm;;
esac
- name: Test the package
shell: bash
run: |
. devtools/github-actions/initialize_conda.sh
conda activate test
export OE_LICENSE="$HOME/oe_license.txt"
export TRAVIS=true
pushd .
nosetests ${PACKAGENAME}/tests/test_forcefield_generators.py --nocapture --verbosity=3 --with-timer -a '!slow'
nosetests ${PACKAGENAME}/tests/test_amber.py --nocapture --verbosity=3 --with-timer -a '!slow'
nosetests ${PACKAGENAME}/tests/test_utils.py --nocapture --verbosity=3 --with-timer -a '!slow'
nosetests ${PACKAGENAME}/tests/test_gromacs.py --nocapture --verbosity=3 --with-timer -a '!slow'
nosetests ${PACKAGENAME}/tests/test_openeye.py --nocapture --verbosity=3 --with-timer -a '!slow'
nosetests ${PACKAGENAME}/tests/test_freesolv.py --nocapture --verbosity=3 --with-timer -a '!slow'
nosetests ${PACKAGENAME}/tests/test_drugs.py --nocapture --verbosity=3 --with-timer -a '!slow'
nosetests ${PACKAGENAME}/tests/test_common_molecules.py --nocapture --verbosity=3 --with-timer -a '!slow'
popd
- name: Deploy
shell: bash
if: false
run: |
echo "Deployment has not been implemented yet"