-
Notifications
You must be signed in to change notification settings - Fork 9
77 lines (63 loc) · 2.48 KB
/
deployment.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
name: Deployment tests
on:
schedule:
- cron: "10 */12 * * *"
workflow_dispatch:
defaults:
run:
shell: bash -l {0}
jobs:
test:
name: ${{ matrix.os }}, 🐍=${{ matrix.python-version }}, 👁️=${{ matrix.openeye }}, ∫=${{ matrix.integration }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.11"]
openeye: [true, false]
integration: [true]
env:
OE_LICENSE: ${{ github.workspace }}/oe_license.txt
steps:
- uses: actions/checkout@v4
- name: Install latest release from conda with OpenEye Toolkits
if: ${{ matrix.openeye == true }}
uses: mamba-org/setup-micromamba@v2
with:
environment-file: devtools/conda-envs/deployment_openeye.yaml
create-args: >-
python=${{ matrix.python-version }}
- name: Install latest release from conda without OpenEye Toolkits
if: ${{ matrix.openeye == false }}
uses: mamba-org/setup-micromamba@v2
with:
environment-file: devtools/conda-envs/deployment.yaml
create-args: >-
python=${{ matrix.python-version }}
- name: License OpenEye
if: ${{ matrix.openeye == true }}
run: |
echo "${SECRET_OE_LICENSE}" > ${OE_LICENSE}
python -c "from openeye import oechem; assert oechem.OEChemIsLicensed()"
env:
SECRET_OE_LICENSE: ${{ secrets.OE_LICENSE }}
- name: Checkout most recent tag
id: vars
run: |
echo "PULL_REQUEST_HEAD=$(git log -1 --format=%H)" >> $GITHUB_OUTPUT
git fetch --all
git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
- name: Run tests
run: |
python -m pytest --durations=0 openff/bespokefit/_tests
- name: Run Integration Tests
if: ${{ matrix.integration == true }}
run: |
openff-bespoke executor run --smiles 'CC' \
--workflow 'default' \
--default-qc-spec xtb gfn2xtb none \
--target-torsion '[C:1]-[C:2]'
- name: Go back to pull request HEAD
# setup-micromamba needs the environment file to exist, which it might not on the most recent tag
run: git checkout ${{ steps.vars.outputs.PULL_REQUEST_HEAD }}