-
Notifications
You must be signed in to change notification settings - Fork 18
109 lines (89 loc) · 3.21 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
name: tests
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
schedule:
- cron: "0 0 * * *"
defaults:
run:
shell: bash -l {0}
jobs:
test:
name: 💻 ${{ matrix.os }}, 🐍 ${{ matrix.python-version }}, 👀 ${{ matrix.openeye }}, pymbar ${{ matrix.pymbar-version }}, Pydantic ${{ matrix.pydantic-version }}, OpenMM ${{ matrix.openmm-version }}
runs-on: ${{ matrix.os }}
env:
OE_LICENSE: ${{ github.workspace }}/oe_license.txt
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
python-version:
- "3.10"
- "3.11"
pymbar-version:
- "3.1"
pydantic-version:
- "2"
openmm-version:
- "8"
openeye:
- true
- false
steps:
- uses: actions/checkout@v4
- name: Setup Conda Environment
uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.5.10-0'
environment-file: devtools/conda-envs/test_env.yaml
create-args: >-
python=${{ matrix.python-version }}
pymbar=${{ matrix.pymbar-version }}
pydantic=${{ matrix.pydantic-version }}
openmm=${{ matrix.openmm-version }}
- name: Install OpenEye
if: matrix.openeye
run: |
echo "${SECRET_OE_LICENSE}" > ${OE_LICENSE}
micromamba install -c openeye "openeye-toolkits =2024.1.0"
python -c "from openeye import oechem; assert oechem.OEChemIsLicensed()"
env:
SECRET_OE_LICENSE: ${{ secrets.OE_LICENSE }}
- name: Install PASCAL Compiler (MacOS)
if: startsWith(matrix.os, 'macOS')
run: brew install fpc
- name: Install PASCAL Compiler (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get install fp-compiler
- name: Install checkmol
run: |
curl https://homepage.univie.ac.at/norbert.haider/download/chemistry/checkmol/checkmol.pas > checkmol.pas
fpc checkmol.pas -S2
echo $(pwd) >> $GITHUB_PATH
- name: Install Package and test plugins
run: python -m pip install . utilities/test_plugins/
- name: Run tests
run: python -m pytest -v --cov=openff openff/evaluator/_tests/ --cov-report=xml --color=yes
- name: Run (non-GPU) tutorials
if: ${{ matrix.pymbar-version == 3.1 }}
run: |
# ForceBalance requires pymbar 3, so don't run these tests if we are using pymbar 4,
# even though we're not running the fitting tutorial
# https://github.com/conda-forge/forcebalance-feedstock/blob/9793b0205489f8ec7826d301a3c82cfb96997c57/recipe/meta.yaml#L29
micromamba install "forcebalance >=1.9.5" -c conda-forge -yq
python -m pytest --nbval-lax --dist loadscope -nauto -p no:randomly \
docs/tutorials/tutorial01.ipynb \
docs/tutorials/tutorial03.ipynb
- name: Code coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}