-
Notifications
You must be signed in to change notification settings - Fork 71
119 lines (106 loc) · 3.79 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
name: CI
on:
pull_request:
branches:
- "master"
schedule:
# nightly tests
- cron: "0 0 * * *"
push:
branches:
- master
jobs:
test:
name: Test on ${{ matrix.cfg.os }}, Python ${{ matrix.cfg.python-version }}, OpenMM ${{ matrix.cfg.openmm }}
runs-on: ${{ matrix.cfg.os }}
strategy:
fail-fast: false
matrix:
cfg:
- { os: ubuntu-latest, python-version: 3.7, docs: true, openmm: latest }
- { os: macos-latest, python-version: 3.7, docs: true, openmm: latest }
- { os: ubuntu-latest, python-version: 3.8, docs: false, openmm: latest }
- { os: ubuntu-latest, python-version: 3.7, docs: false, openmm: nightly }
- { os: ubuntu-latest, python-version: 3.8, docs: false, openmm: nightly }
- { os: ubuntu-latest, python-version: 3.7, docs: false, openmm: conda-forge }
- { os: ubuntu-latest, python-version: 3.8, docs: false, openmm: conda-forge }
env:
OPENMM: ${{ matrix.cfg.openmm }}
OE_LICENSE: ${{ github.workspace }}/oe_license.txt
PACKAGENAME: yank
steps:
- uses: actions/checkout@v2
- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a
# More info on options: https://github.com/conda-incubator/setup-miniconda
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.cfg.python-version }}
environment-file: devtools/conda-envs/test_env.yaml
activate-environment: test
auto-update-conda: true
auto-activate-base: false
show-channel-urls: true
- name: Refine test environment
shell: bash -l {0}
run: |
case ${{ matrix.cfg.openmm }} in
latest)
echo "Using latest release OpenMM."
conda install --quiet -c omnia openmm;;
rc)
echo "Using OpenMM rc"
conda install --quiet -c omnia/label/rc openmm;;
beta)
echo "Using OpenMM beta"
conda install --quiet -c omnia/label/beta openmm;;
nightly)
echo "Using OpenMM nightly dev build."
conda install --quiet -c omnia-dev openmm;;
conda-forge)
echo "Using OpenMM conda-forge testing build."
conda install --quiet -c conda-forge/label/test openmm;;
esac
- name: Install package
shell: bash -l {0}
run: |
python -m pip install --no-deps -v .
- name: Environment Information
shell: bash -l {0}
run: |
conda info -a
conda list
- name: Decrypt licenses
# TODO: MODELLER
shell: bash -l {0}
env:
OE_LICENSE_TEXT: ${{ secrets.OE_LICENSE }}
run: |
echo "${OE_LICENSE_TEXT}" > ${OE_LICENSE}
python -c "import openeye; assert openeye.oechem.OEChemIsLicensed(), 'OpenEye license checks failed!'"
- name: Test the package
shell: bash -l {0}
run: |
export OE_LICENSE="$HOME/oe_license.txt"
export TRAVIS=true
pushd .
nosetests ${PACKAGENAME} --nocapture --with-coverage --verbosity=3 --with-timer -a '!slow' --cover-xml --cover-xml-file=./coverage.xml
popd
- name: Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
fail_ci_if_error: false
- name: Build docs
shell: bash -l {0}
if: matrix.cfg.docs
run: |
cd docs && make html; cd ..
# Move the docs into a versioned subdirectory
python devtools/travis-ci/set_doc_version.py
# Prepare versions.json
python devtools/travis-ci/update_versions_json.py